Forum Discussion

amirtaraj's avatar
amirtaraj
New Contributor
3 years ago

Groovy script to verify xml response data is in ascending order

I have a SOAP Response for which need to use Groovy script to assert if the date parameter in the row xml child are coming in ascending order.

 

xml response -

<tree>
 <row>
  <id>123<id>
  <date>20220501</date>
 </row>
 <row>
  <id>242<id>
  <date>20220502</date>
 </row>
 <row>
  <id>125<id>
  <date>20220502</date>
 </row>
</tree>

 Please help me with the groovy scripting approach/ script for the same, I am a beginner here.

No RepliesBe the first to reply