I'm having trouble getting xmlunit to ignore whitespace in my XML using setIgnoreWhitespace... any idea what could be wrong or what I could check?
JVM: 1.6, XMLUnit 1.3, IDE: JDeveloper 11.1.1.6
For example the below returns "Expected number of child nodes '2' but was '1'". If I take out the extra space it passes.
@Test
public void testExample() {
String inputXML = "<test><innertest>data</innertest></test>";
String expectedResultXml = "<test> <innertest>data</innertest></test>";
XMLUnit.setIgnoreWhitespace(true);
XMLUnit.setIgnoreComments(true);
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true);
try {
assertXMLEqual("Did not match!!", expectedResultXml, inputXML);
} catch(Exception e) {}
}