Diff diff = XMLUnit.compareXML(Strings2.toString(a.getPayload()), Strings2
.toString(b.getPayload()));
// Ignoring whitespace in elements that have other children, xsi:schemaLocation and
// differences in namespace prefixes
diff.overrideDifferenceListener(new DifferenceListener() {
@Override
public int differenceFound(Difference diff) {
if (diff.getId() == DifferenceConstants.SCHEMA_LOCATION_ID
|| diff.getId() == DifferenceConstants.NAMESPACE_PREFIX_ID) {
return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL;