How to compare 2 XML files

X

Xavier

Hi,

I have a soft generating report in XML files. I am searching a soft or
simple Java code to compare 2 XML files, generating report only with the
differences, conserving the XML tree of data.

Any idea ?

Thanks,

Xavier
 
R

Roedy Green

I have a soft generating report in XML files. I am searching a soft or
simple Java code to compare 2 XML files, generating report only with the
differences, conserving the XML tree of data.

parse the two trees. Then a simple minded compare would recursively
sort the nodes at each level, the look for dups, and whatever was not
a dup it would report on. Then it would process the subtrees of each
of the dups recursively.
 
A

Andrew E

Xavier said:
Hi,

I have a soft generating report in XML files. I am searching a soft or
simple Java code to compare 2 XML files, generating report only with the
differences, conserving the XML tree of data.

Any idea ?

Look up xmlunit for java.
There was also a C# solution whose name escapes me that worked pretty well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top