Comparing two XML files using XMLDiff.diff()
883051Aug 18 2011 — edited Aug 21 2011Hi,
I tried to compare two XML files using XMLDiff.diff() method. I gave the following as Inputs to this method:
XMLDoc1:
<Root>
<Child>
<sub-child1> name<sub-child1>
</child>
<Root>
XMLDoc2:
<Root>
<Child>
<sub-child1> name<sub-child1>
<sub-child2>place<sub-child2>
</child>
<Root>
These two XML docs are differing with element <sub-child2>place<sub-child2>. But the diff() method is returning false(i.e the two XML docs are same). If I interchange the Inputs (i.e XMLDoc1 as XMLDoc2 and viceversa) then diff() is returning True and getDiffString() is showing the difference.
Can you please help me?