I was finally able to use xmlunit by recompiling in JDK1.3.1.
For some of the simple xmls it works great, but for some it fails.
The error:
org.custommonkey.xmlunit.Diff [different] Expected number of child nodes '2' but was '5' - comparing <Envelope...> to <Envelope...>
junit.framework.AssertionFailedError: org.custommonkey.xmlunit.Diff
[different] Expected number of child nodes '2' but was '5' - comparing <Envelope...> to <Envelope...>
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:208)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:280)
at test.wamu.transformation.uia.alltel.TestAlltelToUIADocumentResponse.testTranslateMessage(TestAlltelToUIADocumentResponse.java:50)
Any possible hint ?
Thanks,
Salim Djaffar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was finally able to use xmlunit by recompiling in JDK1.3.1.
For some of the simple xmls it works great, but for some it fails.
The error:
org.custommonkey.xmlunit.Diff [different] Expected number of child nodes '2' but was '5' - comparing <Envelope...> to <Envelope...>
junit.framework.AssertionFailedError: org.custommonkey.xmlunit.Diff
[different] Expected number of child nodes '2' but was '5' - comparing <Envelope...> to <Envelope...>
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:208)
at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:280)
at test.wamu.transformation.uia.alltel.TestAlltelToUIADocumentResponse.testTranslateMessage(TestAlltelToUIADocumentResponse.java:50)
Any possible hint ?
Thanks,
Salim Djaffar
Looks like it might be a white space thing.
<element> stuff </element> is three nodes where as <element>stuff</element> is one.
Have you tried turning on ignore whitespace
Yes, you're right.
Setting the ignore whitespace to true saves the day.
Thanks much.