if (!startA.getName().getLocalPart().equals(startB.getName().getLocalPart())) {
message.append("Different elements ").append(startA.getName()).append(", ").append(startB.getName()).append(" at location ").append(eventA.getLocation());
return false;
}
} else if (eventType == XMLStreamConstants.END_ELEMENT) {
EndElement endA = eventA.asEndElement();
EndElement endB = eventB.asEndElement();
if (!endA.getName().getLocalPart().equals(endB.getName().getLocalPart())) {
message.append("Different elements ").append(endA.getName()).append(", ").append(endB.getName()).append(" at location ").append(eventA.getLocation());
return false;
}
} else if (eventType == XMLStreamConstants.CHARACTERS) {
Characters endA = eventA.asCharacters();
Characters endB = eventB.asCharacters();
if (!endA.getData().equals(endB.getData())) {
message.append("Different content ").append(endA.getData()).append(", ").append(endB.getData()).append(" at location ").append(eventA.getLocation());
return false;
}
}
}