xmlFragments.add(xmlInnerElement);
} else {
return name.equals(elementEvent.element.rawname); // succeed if exact end element found and all is balanced
}
} else if (event.type == XMLEvent.CDATA) {
xmlFragments.add(new XMLText(event.toString()));
} else if (event.type == XMLEvent.CHARACTERS) {
XMLString xmlString = ((CharactersEvent) event).text;
xmlFragments.add(new XMLText(xmlString.toString()));
} else {
// ignore other types, as of XMPP spec
}
}
}