cancel
Showing results for 
Search instead for 
Did you mean: 

Exclude specific tags and attributes from XML report

SOLVED
Highlighted
Occasional Contributor

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Exclude specific tags and attributes from XML report

You should be able to exclude data from specific nodes with the built in XML checkpoint.

 

https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/xml/excluding-data.html

 

 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

3 REPLIES 3
Community Hero

Re: Exclude specific tags and attributes from XML report

You should be able to exclude data from specific nodes with the built in XML checkpoint.

 

https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/xml/excluding-data.html

 

 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

Occasional Contributor

Re: Exclude specific tags and attributes from XML report

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

Community Hero

Re: Exclude specific tags and attributes from XML report

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.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors