I seem to have come to a rookie error junction.
I can make requests and post various bits of data using HTTP requests etc. However I'm working with the IoBridge API and I'm trying to parse a request so I can pull various elements out of the an XML return. I can get what I want working by being very explicit in my API request but I thought I could make a full request and then parse it using a function to then send what I want to another server.
I've drawn a blank, This is what I get back which is great. What I want to do is pull out say the status and just send that off to another server. I've tried using tmeplates which are returning nothing. I'm making some sort of school boy error here. How would you guys parse this data out?
<?xml version="1.0" encoding="utf-8"?>
<module>
<serial>xxxxxxxxx</serial>
<label>Boiler Monitor</label>
<lat>00</lat>
<long>00</long>
<location>London</location>
<time_zone>Europe/London</time_zone>
<local_time>2016-03-21 16:10:18</local_time>
<datetime>2016-03-21 16:10:18</datetime>
<status>Online</status>
<channel_1>
<label>Under Floor Out</label>
<AnalogInput>35.4</AnalogInput>
<AnalogInputRaw>623</AnalogInputRaw>
<AnalogInputScale>Temp C</AnalogInputScale>
<DigitalInput>On</DigitalInput>
<DigitalInputState>1</DigitalInputState>
<PulseCountRaw>2</PulseCountRaw>
<DigitalOutput>Off</DigitalOutput>
<DigitalOutputState>0</DigitalOutputState>
<Variable1>0</Variable1>
</channel_1>
<channel_2>
<label>Under Floor Return</label>
<AnalogInput>20.4</AnalogInput>
<AnalogInputRaw>460</AnalogInputRaw>
<AnalogInputScale>Temp C</AnalogInputScale>
<DigitalInput>On</DigitalInput>
<DigitalInputState>1</DigitalInputState>
<PulseCountRaw>1</PulseCountRaw>
<DigitalOutput>Off</DigitalOutput>
<DigitalOutputState>0</DigitalOutputState>
<Variable1>0</Variable1>
</channel_2>
<channel_3>
<label>Hot Water</label>
<AnalogInput>29.7</AnalogInput>
<AnalogInputRaw>563</AnalogInputRaw>
<AnalogInputScale>Temp C</AnalogInputScale>
<DigitalInput>On</DigitalInput>
<DigitalInputState>1</DigitalInputState>
<PulseCountRaw>2</PulseCountRaw>
<DigitalOutput>Off</DigitalOutput>
<DigitalOutputState>0</DigitalOutputState>
<Variable1>0</Variable1>
</channel_3>
<channel_4>
<label>LCD Output</label>
<AnalogInput>302</AnalogInput>
<AnalogInputRaw>302</AnalogInputRaw>
<AnalogInputScale>Raw</AnalogInputScale>
<DigitalInput>On</DigitalInput>
<DigitalInputState>1</DigitalInputState>
<PulseCountRaw>2</PulseCountRaw>
<DigitalOutput>Off</DigitalOutput>
<DigitalOutputState>0</DigitalOutputState>
<Variable1>0</Variable1>
</channel_4>
</module>
Any clues deeply appreciated.