- simplexml_load_string: documentation ( source)
<?php
$xml = "<xml>
<data>
<parameters>
<temperature>
<value></value>
<value></value>
</temperature>
</parameters>
</data>
</xml>";
$xml = simplexml_load_string( $xml);
foreach( $xml->xpath( './/child') as $child) {
echo $child->attributes()['name'] . "\n";
}