Is there any more elegant way to escape SimpleXML attributes to an array?
$result = $xml->xpath( $xpath ); $element = $result[ 0 ]; $attributes = (array)
a more elegant way; it gives you the same results without using $attributes[ '@attributes' ] :
$attributes = current($element->attributes());