Hi Forum
Please can you help me to return a value from an XML file? I have read all of the other posts around the forum on this, and nothing helps.
My XML file is:
<?xml version="1.0"?>
<response><device><id>2174</id><description>Ciano60l</description><type>1</type><time_diff>0</time_diff><status><disconnected>0</disconnected><slide_serial>m19ry904qr1</slide_serial><slide_expires>1564913415</slide_expires><out_of_water>0</out_of_water><wrong_slide>0</wrong_slide><last_experiment>1564854961</last_experiment></status><exps><temperature><trend>1</trend><critical_in>3</critical_in><avg>25.756</avg><status>0</status><curr>25.750</curr><advises/></temperature><ph><trend>1</trend><critical_in>-1</critical_in><avg>7.25</avg><status>0</status><curr>7.26</curr><advises/></ph><nh3><trend>0</trend><critical_in>-1</critical_in><avg>0.156</avg><status>1</status><curr>0.156</curr><advises/></nh3><light><max_value>100</max_value><status>0</status><curr>19</curr><advises/></light></exps></device></response>
and my Item is as follows:
String myTemp "myTemp [%s]" {http="<[https://api.seneye.com/v1/devices/?IncludeState=1&user=[USERNAME GOES HERE BUT DELETED FOR FORUM POST]&pwd=[PASSWORD DELETED]:300000:XPATH(/response/device/exps/temperature/curr/text())]"}
and the data it returns is the whole thing, not just the Current Temperature (which is what I’m trying to get)
Can anyone help? The XPATH transformation and the HTTP binding are both installed, and as you can see, the item is getting values from the api but it is returning everything not just the specific value I want…