Forum Discussion

ssv's avatar
ssv
Occasional Contributor
6 years ago

Test Complete XML Files comparison

I need to compare two XML Files. I cannot use the XML Checkpoint in my project for this comparison.

 

The testing goes like this:

 

I install the necessary software

Create the backup of the settings through an XML File and store it in a different location.

Then i perform the upgrade of the software which gives me an XML file.

Then i need to compare the two xml files and raise an error if there is a problem.

 

1) The problems i have is that, I cannot use the XMLCheckpoint, as the first file XML generated content may vary.

2) The DOM elements are shuffeled, say for example, in the xml before the upgrade, the "verbosity element" was in line10, while in the xml file generated after the upgrade had the "verbosity element" at line 50. How can i compare two XML file where the DOM elements are presented in the different spots.

 

Could someone point me out in the right direction?