I'm trying to compare to xml files, such that the comparison is
insensitive to whitespace.  I used the method "setStripWhitespaceText()"
in the hope of making the SAXReader insensitive to whitespace.  However,
when I use NodeComparator.compareContent(), I do not get the desired
zero even if the only difference between the two xml docs is whitespace
within an element.  Below is my code:


SAXReader r = new SAXReader();
r.setStripWhitespaceText(true);
Document docTest = r.read("TestFiles/test.mapping.xsl");
Document docTestTest = r.read("TestFiles/test.test.mapping.xsl");
                
NodeComparator c = new NodeComparator();
System.out.println("Result of comparison:  " + c.compareContent(docTest,
        docTestTest));


Thanks for your reply!

BTW, dom4j is definitely the best XML API I've ever used, and I actively
endorse it to all my friends.  Thanks to the project owners and all the
contributors for creating an API that is making me look good with my
bosses.

;)
                        



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to