1

I have the following xml:

<td class="tableCell restrictionCell">
    <span class="restrictionEditLink"  rId="202">edit</span>
    &nbsp;<span class="restrictionDeleteLink"  rId="202">delete</span>
</td>

I'm attempting to extract the value of the rId attribute using the following XPath

//td/span/@rId

In JMeter it's returning 0 matches. If I test it in an online XPath tester, I'm getting the value as expected.

If I run:

//td/span/@class

JMeter returns the two class values as I expect.

Also attempted to use:

//td/span[@class="restrictionEditLink"]/@rId

Which also returns 0 results in JMeter, but the rId value in an online XPath tester.

0

Not sure I can explain this one, but I noticed that the result set in JMeter when searching for @class was returning rid instead of rId as it is in the response message being parsed. Changing over to @rid returns the values I was looking for.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.