try {
Diff diff = XMLUnit.compareXML(xml, item);
return diff.identical();
} catch (IOException e) {
throw new RuntimeAssertionFailure("Failed to compare XML", e);
} catch (SAXException e) {
throw new RuntimeAssertionFailure("Failed to compare XML", e);
}
}