Sorry there's a mistake in the previous function :
<?php
function &getXMLnode($object, $param) {
foreach($object as $key => $value) {
if(isset($object->$key->$param)) {
return $object->$key->$param;
}
if(is_object($object->$key)&&!empty($object->$key)) {
$new_obj = $object->$key;
// Must use getXMLnode function there (recursive)
$ret = getXMLnode($new_obj, $param);
}
}
if($ret) return (string) $ret;
return false;
}
?>