simple exemple of use to retrieve all attributes of an element
foreach ($root->childNodes as $child) {
if ($child->hasAttributes()){
foreach ($child->attributes as $attribute){
print "AttributName= ".$attribute->name. "<br/>\n";
print "AttributValue= ".$attribute->value. "<br/>\n";
}
}
}