Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

How to compare 2 XML files

Thread view: 
Xavier - 30 Nov 2005 15:12 GMT
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
Roedy Green - 30 Nov 2005 17:11 GMT
On Wed, 30 Nov 2005 16:12:58 +0100, "Xavier"
<xno.spam.ni.pub@net.nosp.celer.com> wrote, quoted or indirectly
quoted someone who said :

>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.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew E - 02 Dec 2005 06:25 GMT
> Hi,
>
[quoted text clipped - 3 lines]
>
> Any idea ?

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.