class MyXMLElement extends SimpleXMLElement { function listePrenoms() { return $this->xpath('/individus/individu/prenom'); } }