I am using XMLunit to compare the following XML's
XML 1
<element1>
</element1>
<element2> Some Text </element2>
XML 2
<element1/>
<element2>Some Text</element2>
I am expecting only element 2 to come in difference however I get a difference like this for element1
"Expected presence of Child node to be true but was false".
"Expected number of child node 1 but was 0"
"Expected presence of child node '#text' but was null.
I know this can go away with setIgnoreWhiteSpace
but I want the element2
whitespace difference.