try
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating( true );
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
docBuilder.setEntityResolver( new ResourceEntityResolver() );
docBuilder.setErrorHandler( new DefaultHandler() );
// Make sure that it matches even if the elements are not in
// the exact same order
final Diff myDiff = new Diff( docBuilder.parse( expectedDeploymentDescriptor ),