Access @attributes Nodes in SimpleXML Objects
To access the [@attributes] in a SimpleXML object use the following code:
$xml = simplexml_load_string($curl_result, 'SimpleXMLElement', LIBXML_NOCDATA);
foreach ($xml->item as $f)
{
echo $f->attributes()->id . '<br />';
}
