PHP Attribut Xml Parsing

Je suis d'Analyse XML utilisant actuellement:

$data = simplexml_load_string($xmlFile);
foreach($data->item as $key => $current){
   echo($current);
}

Cependant, je me demandais, si on frappe un élément qui ressemble à ceci:

<thumbnail url="http://foo.bar" height="225" width="300"/>

Comment puis-je tirer la partie à l'intérieur de cela? (hauteur, url, nom, largeur)

Merci!

OriginalL'auteur Petrogad | 2009-07-21