this.db
.parse(getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_2_3.xml"));
XMLUtils.circumventBug2650(doc);
NodeList nodes = XPathAPI.selectNodeList(doc.getDocumentElement(),
"(//. | //@* | //namespace::*)[ancestor-or-self::p]");
Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments();
byte[] reference = JavaUtils.getBytesFromFile(
getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_2_3_c14nized_exclusive.xml") );
byte[] result = c.engineCanonicalizeXPathNodeSet(nodes);
boolean equals = JavaUtils.binaryCompare(reference, result);
if (!equals) {
log.warn("Error output = " + new String(result));
}
assertTrue(equals);