- var_dump: documentation ( source)
- simplexml_load_string: documentation ( source)
<?php
$string = <<<XML
<sizes>
<size label="Square" width="75" height="75" />
<size label="Thumbnail" width="100" height="62" />
<size label="Small" width="112" height="69">small</size>
<size label="Large" width="112" height="69">large</size>
</sizes>
XML;
$xml = simplexml_load_string($string);
$result = $xml->xpath("//size");
// print the first (and only) member of the array
var_dump($result);