xref: /PHP-7.0/ext/simplexml/examples/xpath.php (revision 594f6433)
1<?php
2$books = simplexml_load_file('book.xml');
3
4$xpath_result = $books->xpath("/books/book/title");
5foreach($xpath_result as $entry ) {
6    print "$entry \n";
7}
8
9?>
10