Have the following XML response,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<globalTestList rowCount="1">
<testcase>
<checkedOut>N</checkedOut>
<group name="PerfTest105" recid="2489"/>
<testImportance>0</testImportance>
<testRecid>2491</testRecid>
<testType>Conventional Function Test</testType>
<preFetched>Y</preFetched>
<priority>6</priority>
<series>Functional</series>
<test id="98132" recid="2401"/>
<subject number="98132" recid="2476"/>
<testCode>555210</testCode>
<userId>1201</userId>
<test name="Functional Test 1" recid="2478"/>
<workflowChangeDate>2023-06-28T13:07:08Z</workflowChangeDate>
<workflowState>Testing.Imported</workflowState>
</testcase>
</globalTestList>
What to retrieve the recid
from <group name="PerfTest105" recid="2489"/>
. Specifically it should be associated group attribute which is 2489
as there are other recid
as well.
Know values from previous response are,
know from previous response recid="2478"
and recid="2401"
& 555210
.
Is there a way using xpath/ regex I can fetch the recid
for the group
. also cannot trust group name="PerfTest105"
as it is dynamic too.
I tried with //timsCode[text()='555210']/parent::*/@recid
but not working