I am trying to get xml elements by child element in karate, as following:
<tasks>
<task>
<Id>S1</Id>
<UID>1</UID>
</task>
<task>
<Id>S2</Id>
<UID>2</UID>
</task>
</tasks>
From the above xml example, I want to get elements of 'task' tag having Id='S2' using karate. My expected result after getting:
<task>
<Id>S2</Id>
<UID>2</UID>
</task>
So please help me if you know that how to get xml elements by child element in karate? Thanks!