How can I obtain a nested value from the XML result of a "HTTP XML/REST Value Sensor", an example of the XML result I receive is:
<response status="success"> <result> <IPSec> <entry> <pkt-decap>591815314</pkt-decap> <state>active</state> <anti-replay>True</anti-replay> </entry> </IPSec> </result> </response>
What should I enter in the "XML Node (and optional property)" field in the sensor's settings if I want to obtain the value of 'state'?
I have tried the following but all result in the error message "Node not found in xml result"
result/IPSec/entry/state entry/state
Thanks,
James.
Article Comments
Unfortunately not, just tried it and got an error saying "Node ./response/result/IPSec/entry/state not found in xml result."
Mar, 2014 - Permalink
Hi,
with the given XML and the Node Path I had no issues obtaining the value in the node.
Any chance the target which is producing the XML is available public?
If so, please send the URL to support@paessler.com and refer to this article.
Mar, 2014 - Permalink
Hi,
Upon further inspection it turns out that URL I was using was not formatted properly, I have corrected it and it's now working fine.
Thanks for your help. James.
Mar, 2014 - Permalink
Hi,
have you tried using the following:
Does that work?
Mar, 2014 - Permalink