Forum Discussion

harshad_w's avatar
harshad_w
Occasional Contributor
5 years ago
Solved

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? 

 

Thanks,

Harshad

 

 

3 Replies

    • harshad_w's avatar
      harshad_w
      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.

       

      Thanks,

      HarshadW

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        > 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.