$xml = simplexml_load_file("contact.xml"); $book = $xml->xpath("/contact/personal[title='Manager']"); echo $book[0]->title;?>