I have an XML message like so:
<root>
<elementA>something</elementA>
<elementB>something else</elementB>
<elementC>yet another thing</elementC>
</root>
I want to compare a message of this type produced by a method under test to an expected message, but I don't care about elementA. So, I'd like the above message to be considered...
Hi
I am trying to use XMLUnit to compare two similar XML files. Basically every thing is same. File1 is a copy of File2. But in File2 I have changed the order of some elements in one node.
Now I am trying to run a test where it compares these files and returns a result of "similar" and not treat these files as "different".
Can you pl...
How could I catch this AssertionFailedError and print to the console an message that says:
"Expected text value '55555' but was '55556' at /xpathResult[1]/result[2]/field[1]/field[1]/field[6]/text()[1] for [testFileName] and [testName]"
I'm not exactly sure how to catch the values out from the assertion without having to "hack" and man...
Given an xml document like
<root>
<row>
<a>2</a>
<b>1</b>
<c>8</c>
</row>
<row>
<b>5</b>
<a>2</a>
<c>8</c>
</row>
<row>
<a>2</a>
<c>8</c>
<b>6</b>
</row>
</root>
Is there an easy way to assert that the XML document is sorted on element B in XMLUnit
Edit: I have an odd problem with a pie...
I have some XML which I am testing, which has set as one of it's elements the date and time. This obviously will change every time the test is run.
Is there a way to compare the XML and have this node value ignored, or just checked with a regular expression or something.
The XML I am testing is as follows:
<xml-fragment>
<core:da...
Hi,
Is it possible to ignore few children in elements when comparing xml documents with xmlunit. i want to ignore any empty text nodes in the element when comparing them.
Best Regards,
Keshav
...
Hello,
I am trying to see if I could use XMLUnit to compare the following two different XML.
I used the Diff class to compare the following two XML and checking for similar returns false.
XML One
<Required>
<Question desc="Are you single?">
<Answers>
<Answer value="Yes"/>
<Answer value="No"/>
</Answers>
...