Comparing 2 XML Documents

Discussions

XML & Web services: Comparing 2 XML Documents

  1. Comparing 2 XML Documents (4 messages)

    Does anyone has any experience in comparing two XML documents and showing the diff between them.

    Threaded Messages (4)

  2. Comparing 2 XML Documents[ Go to top ]

    maybe do a google search for java diff tool
  3. Comparing 2 XML Documents[ Go to top ]

    If you just need to compare two XML files textually, try out ExamDiff. I guess the URL for ExamDiff is www.examdiff.com. If not, just google it out.

    -Shree
  4. Comparing 2 XML Documents[ Go to top ]

    It would also be helpful to reduce the XML documents to some kind of "canonical form" before comparing them. You can use either XSLT or JAXP to do this.

    I would suggest (a) stripping out all the whitespace-only nodes and (b) adding a line break after each end tag. That should cut down on false negatives because of whitespace differences.
  5. Comparing 2 XML Documents[ Go to top ]

    You can take a look at http://xmlunit.sourceforge.net/ xml unit testing (like JUnit).

    Regard, Nanne