Topic: Extract Elements from XML
Hello.
I have an XML file comprising:
<?xmlversion="1.0"encoding="UTF-8"?>
<DistanceMatrixResponse>
<status>OK</status>
<origin_address>London,UK</origin_address>
<destination_address>Hastings,UK</destination_address>
<row>
<element>
<status>OK</status>
<duration>
<value>7471</value>
<text>2hours5mins</text>
</duration>
<distance>
<value>122507</value>
<text>123km</text>
</distance>
</element>
</row>
</DistanceMatrixResponse>
It's actually one long line of XML. It seems as though this forum editor has inserted the CRLFs.
I'm drawing a blank on how to extract the time (2hours5minutes) and distance (123km) elements. Does MVD have an XML parser?
Thanks