Kavitha Tupelly - 2008-06-19

HI,
I am trying to compare these two XML Nodes

    String myControlXML = "<test><case name=\"case1\"/><case name=\"case2\"/></test>";
        String myTestXML = "<test><case name=\"case2\"/><case name=\"case1\"/></test>";

using this
        Diff myDiff = new Diff(myControlXML, myTestXML);
        myDiff.overrideElementQualifier(new ElementNameAndTextQualifier());
        System.out.println("myDiff: "+myDiff.similar());

I get an error.

Exception in thread "main" junit.framework.AssertionFailedError: But they are equal when an ElementQualifier controls which test element is compared with each control element, org.custommonkey.xmlunit.Diff
[different] Expected attribute value 'case1' but was 'case2' - comparing <case name="case1"...> at /test[1]/case[1]/@name to <case name="case2"...> at /test[1]/case[1]/@name

Any Ideas?