- simplexml_load_string: documentation ( source)
<?php
$xml = "<root>
<description>
<h4>Standard Lanes</h4>
<child name='Child2' />
<subparent>
<child name='Child3' />
</subparent>
</parent>
<child name='Child4' />
</root>";
$xml = simplexml_load_string( $xml);
foreach( $xml->xpath( './/h4') as $child) {
echo $child->attributes()['name'] . "\n";
}