Hi all,

I am currently working on a macro that will allow me to compare 2 XML files in VBA. I am using the MSXML library so that I can use XML objects in code.
So far I have been able to load 2 XML files, but I have not been able to figure out how to loop through the nodes and child nodes in order to compare them.

The code I am using so far to load the XML files and attempt to loop through them is this:

Please Login or Register  to view this content.
I have never worked with the MSXML library before, so I am not sure how to read nodes and their attributes correctly. I have tried a few methods I have found on Google, but have had no success. Most examples will read specific items in XML files such as peoples names or book titles which look for specific nodes. My one needs to read an entre XML file so needs to capture all nodes (Basically *). Once I can understand how to read nodes and their attributes I can get it working. My approach will be a slow and methodical process of looping through the nodes in XML1 and its child nodes, and then comparing those to the nodes/child nodes of XML2. It will be inefficient, but will be a start.

If anyone out there has experience with XML files I would appreciate any advice. Once I get the macro working I will share my code to help others.