Click to See Complete Forum and Search --> : Comparing two XML documents


vasudup
02-24-2005, 12:45 AM
Hello All,

I am writing a java program(SAX) to compare two XML documents.I am comparing it only based on "elements structure", nothing to do with DTDs or XML schemas or entities.

I am collecting the start tags and end tags of both documents, and checking whether they are equal or not, in the particular order.The order of all start tags and end tags in both documents should be same.

Will this really work, or am I missing any complexity? Are there any other issues I have to look on?

Thank You.

m1cky
02-25-2005, 06:10 AM
i think the elements and nodes must not always be in the same order while the documents both remain semantically correct and equal.
But few days ago I thought about such tool cause I could have some use for it.