Comparing one xml file with the the multiple
I have a requirement ,
want to compare set of folder with xmls with a set of xml in the folder .im using this for the informatica regression testing .the problem is the the sort order after the deployment is different .say if there is an employee node with an id (51) in 7 th xml of folder A ,the same node with the same information is present in the 2nd xml of folder b .
so want to take each and every node employee with id child node and check with the xmls in the folder b and check the remaining the nodes values and produce the comparison result in excel
is there a comparison tool(free ware) I can do that ? or any ideas please
I think it depends on how smart you want the XML tool to be.
Easy but dirty way to do it, is to compare is beautify the xml, XML Beautifier, then use a file diff tool. I think googling XMLDiff will produce a bunch of search results that will also do that (although I haven't used those).
If you want to write code for something smarter, you can load them into XML Parser library, then iterate on each node on the first object, then attempt to do an xpath selection on the 2nd one to see if the nodes exist in both files. Then do a diff of those nodes.