How to compare XML files
I have two XML files (XSD) which are generated by some tool. The tool doesn't preserve the order of elements so although the content is equal comparing it as text will result as the files are different. Is there some tool that can sort the elements before comparing and will enable text comparison of the documents? Of course the sorting needs to be done recursively. Data example: File A: <xml> <A/> <B/> </xml> File B: <xml> <B/> <A/> </xml> I had a similar problem and I eventually found: http://superuser.com/questions/79920/how-can-i-diff-two-xml-files That post suggests doing a canonical xml