I have a XML file like this and I just want to get the value inside the Property which is “1”, what should be the PHP code? Thanks in advance.
<?xml version="1.0" encoding="UTF-8" ?>
<nodeInfo>
<node flag="128">
<address>18 F5 40 1</address>
<name>iMeterSolo</name>
<type>9.7.135.92</type>
<enabled>true</enabled>
<deviceClass>0</deviceClass>
<wattage>0</wattage>
<dcPeriod>0</dcPeriod>
<pnode>18 F5 40 1</pnode>
<property id="ST" ***value="1"*** formatted="1" uom="W" />
</node>
<properties>
<property id="ST" value="1" formatted="1" uom="W" />
<property id="TPW" value="226" formatted="226" uom="kWs" />
</properties>
</nodeInfo>
1 Answer