I am trying to compare these two files (note1.xml and note2.xml). My code does not return a "similar" result. What am I doing wrong? Please help.
**//////////////////////////My code**
InputSource xml1 = new InputSource("C:\xmlunit-1.3\note1.xml");
InputSource xml2 = new InputSource("C:\xmlunit-1.3\note2.xml");
Diff different = XMLUnit.compareXML(xml1, xml2);
System.out.println("******************************************");
System.out.println("Similar: " + different.similar() + "\nIdentical: " + different.identical() + "\nDifferent: " + different.toString());
System.out.println("*****************************************");
/////////////////////////Output
Similar: false
Identical: false
Different: org.custommonkey.xmlunit.Diff
[not identical] Expected sequence of child nodes '1' but was '5' - comparing at /note[1]/to[1] to at /note[1]/to[1]
[not identical] Expected sequence of child nodes '3' but was '1' - comparing at /note[1]/from[1] to at /note[1]/from[1]
[different] Expected text value '
' but was '
' - comparing
at /note[1]/text()[3] to
at /note[1]/text()[3]
/////////////////////////note1.xml
Tam
John
Reminder
How are you?
//////////////////////note2.xml
John
Reminder
Tam
I'm fine.