use of org.jivesoftware.smackx.message_retraction.element.RetractedElement in project Smack by igniterealtime.
the class RetractedElementProvider method parse.
@Override
public RetractedElement parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException, ParseException {
Date date = ParserUtils.getDateFromXep82String(parser.getAttributeValue("", RetractedElement.ATTR_STAMP));
OriginIdElement originIdElement = null;
while (originIdElement == null) {
XmlPullParser.TagEvent tag = parser.nextTag();
if (tag == XmlPullParser.TagEvent.START_ELEMENT && OriginIdElement.ELEMENT.equals(parser.getName()) && StableUniqueStanzaIdManager.NAMESPACE.equals(parser.getNamespace())) {
originIdElement = OriginIdProvider.INSTANCE.parse(parser);
}
}
return new RetractedElement(date, originIdElement);
}
Aggregations