Menu

Desired features for XMLUnit

Vineeth
2005-01-05
2013-03-03
  • Vineeth

    Vineeth - 2005-01-05

    Tim/Jeff,

    I was checking out XMLUnit for a tool that I am trying to make. Essentially I want to be able to detect all the differences between XML . I noticed a couple of things :-

    1) New elements in the Test nodelist are not detected in the DifferenceEngine.compareNodeList method. Sometimes the XPath losses a node (I am still trying to figure out why this is so). It makes sense to see the result of a comparison result as
      Removed Nodes.....
      Newly added Nodes....
      Changed Nodes.....

    2) Unordered elements are not handled. So basically

    XML1
    <members>
        <name>Jeff</name>
        <name>Tim</name>
    </members> 

    XML2
    <members>
        <name>Tim</name>
        <name>Jeff</name>
    </members> 

    are not the same. But as you know an XML Document is essentially a tree of nodes and child nodes so going  by that logic these 2 XML should be the same. Don't you think so?

    Is there any work being done in this area? If not don't you think these are some areas for concern to make this a great XML-diff tool.

    Thanks,
    Vineeth

     
    • Sebastian

      Sebastian - 2005-04-19

      >2) Unordered elements are not handled.

      please see my note at:
      http://sourceforge.net/forum/message.php?msg_id=2726109

      The link might end soon, please try:
      http://www.aformatik.de/OpenSourceWiki/Wiki.jsp?page=XMLUnitExtensions

       
    • Jamie Bisotti

      Jamie Bisotti - 2005-09-09

      I've tried your example and it still does not seem to compare properly.

       

Log in to post a comment.