Kumar, Since XML files are text-based, you can use any freely available file comparison tools to compare XML files. Or even better, you can write one yourself. Many implementations of DOM( Sun, IBM, Oracle etc ) also have helper methods that return the String representation of the XML document. If you just want to compare two XML files to findout if they are same( and not worry about how they differ if they differ, ) then you can simply use equals() method on the returned string objects. Voila!! Hope that helps ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
posted 18 years ago
Hi Ajith What you said is what I end up doing. I don't see any single method that returns a String in xercers parser. So I wrote a small method to just read in the XML file and created a String out of it. Then I did the the string comparison like you mentioned with a small change. In this specific case I need to eliminate one tag before comparing. http://www.deltaxml.com/index.html is the tool which I found close to what I was looking for. Because while comparing the two XML files actually I need to know which are tags that changed. I am in the process of evaluating the same. The free version is only available as command line. Thanks a lot for your help
------------------ Regards ARS Kumar Sun Certified Java 2 Programmer.
ARS Kumar, Sun Certified Programmer for Java 2 Platform