I am trying to extract a particular Xpath from a returned XML response on Jmeter.
Sample Response XML:
<?xml version="1.0" encoding="UTF-8"?>
<Responses>
<Rate href="http://test.com/psi?attribute1=x&attribute2=y">
<Cost currency='USD'>10</Cost>
</Rate>
</Responses>
I am using http://codebeautify.org/Xpath-Tester# to obtain the XPATH. I need the cost "10". I am looking at Xpath - //Responses/Rate/Cost/text() but this returns blank value. Now I update my XML to (Note: Removed the href part):
<?xml version="1.0" encoding="UTF-8"?>
<Responses>
<Rate>
<Cost currency='USD'>10</Cost>
</Rate>
</Responses>
The same XPATH //Responses/Rate/Cost/text() now returns "Text = 10". Any idea what problem the href is causing?