AnsweredAssumed Answered

How to compare value of XML tags from two different XML files using "Read properties from File"?

Question asked by SKavitha on Nov 18, 2017
Latest reply on Nov 21, 2017 by SKavitha

How to compare value of XML tags from two different XML files using "Read properties from File"?

File 1:

<company>
<employee>
<fname>sam</fname>
<empid>1234</empid>
</employee>
<employee>
<fname>John</fname>
<empid>9876</empid>
</employee>
</company>

 

File 2:

<employee>
<firstname>sameer</firstname>
<empid>1234</empid>
</employee>

 

I want to verify whether value of fname(sam) from file1.xml is same as firstname(Sameer) from file2.xml.

 

I used "Read properties from File" step to read values of XML file.

To access value of firstname  I used {{firstname}} which gave me the value "Sameer"

My question is how to retrieve fname value as it has parent child relation ship?

I tried {{company.employee[0].fname}}, but I did not get the value.

How to get the value of XML tag which has parent child relationship in "Read properties from File"?

Outcomes