You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by jtester <sh...@gmail.com> on 2011/11/05 10:52:46 UTC

Using Xpath

Hi,

I have the following response, i need to extract <transID> and parent
<txnID>. When i use xpath --> response/transID, my debug sampler fails to
retrieve data in <txnID>.

I m sure my xpath query is correct,as it works for other elements like if i
want to extract <fees> , it is extracting correctly. I m not sure wats wrong
it doesnt extract <transID> and <txnID>. Please help

<response>
<message code="72">
You requested to transfer NGN 1000.00 
</message>
<time>05/11/11 16:33</time>
<fees>0</fees>
<transID>12</transID>
<txnID>297</txnID>
</response>

--
View this message in context: http://jmeter.512774.n5.nabble.com/Using-Xpath-tp4966311p4966311.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Using Xpath

Posted by Deepak Shetty <sh...@gmail.com>.
hi
what other options did you select for the extractor (for e,g, Tidy should
be unchecked)
Next did you also add a view results tree listener and check that the
response is exactly as you say it is? Is your XPath extractor a child of
this sampler?

On Sun, Nov 6, 2011 at 1:03 AM, jtester <sh...@gmail.com> wrote:

> Thanks for your reply
>
> My XPath query is   "/response/transID" and externally i have tested my xml
> response with firepath plugin in firebug, It finds the correct element.
> Infact jmeter extracts other elements correctly, but not <transID> and
> <txnID>. I m not able to make it out where i m going wrong.
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Using-Xpath-tp4966311p4968100.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Using Xpath

Posted by jtester <sh...@gmail.com>.
Thanks for your reply

My XPath query is   "/response/transID" and externally i have tested my xml
response with firepath plugin in firebug, It finds the correct element.
Infact jmeter extracts other elements correctly, but not <transID> and
<txnID>. I m not able to make it out where i m going wrong.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Using-Xpath-tp4966311p4968100.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Using Xpath

Posted by David Luu <ma...@gmail.com>.
What does your XPath query look like? And have you tested the response XML
against your XPath externally like via a XPath query/test tool?

On Sat, Nov 5, 2011 at 2:52 AM, jtester <sh...@gmail.com> wrote:

> Hi,
>
> I have the following response, i need to extract <transID> and parent
> <txnID>. When i use xpath --> response/transID, my debug sampler fails to
> retrieve data in <txnID>.
>
> I m sure my xpath query is correct,as it works for other elements like if i
> want to extract <fees> , it is extracting correctly. I m not sure wats
> wrong
> it doesnt extract <transID> and <txnID>. Please help
>
> <response>
> <message code="72">
> You requested to transfer NGN 1000.00
> </message>
> <time>05/11/11 16:33</time>
> <fees>0</fees>
> <transID>12</transID>
> <txnID>297</txnID>
> </response>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Using-Xpath-tp4966311p4966311.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>