File fileIn = new File(inFile);
File fileOut = new File(outFile);
// compare with output document to be matched
InputStreamReader brdr = new FileReader(fileIn);
InputStreamReader frdr = new FileReader(fileOut);
DocumentComparator comp = new DocumentComparator(System.err);
if (comp.compare(frdr, brdr))
getLog().info("JiBX document compare successful");
else
throw new MojoExecutionException("Documents are not equal on document-compare");
} catch (XmlPullParserException e) {
Throwable cause = (e.getCause() != null) ? e.getCause() : e;