Forum Discussion

harshad_w's avatar
Occasional Contributor
5 years ago

Exclude specific tags and attributes from XML report

I am comparing two XMLs. One is a baseline file that has the properties to be compared with an output file. The checkpoint fails due to some attribute values like version number, date, etc. I want to remove such attributes and their values. 


The attached screenshot depicts the failed values. What do I need to do to exclude such values in order to avoid it from failing? 






3 Replies

    • harshad_w's avatar
      Occasional Contributor

      I tried the solution you suggested. It's still showing mismatches. Some tags like version number, build number, etc. appear in the report that gets generated run time. Even if I delete the tags from the Tree View, they are present in the output file. How can that be ignored? TC still compares these tags.




      • AlexKaras's avatar
        Champion Level 3



        > How can that be ignored?

        In this case you should follow the way mentioned in the Note section of the referenced help topic.

        I.e. you should pre-process both master and actual XML documents (using the native XML processing functions) and remove nodes and/or attributes that must be ignored and run comparison after this.