php-src/ext/simplexml/examples/xpath.php
2004-01-17 21:44:22 +00:00

10 lines
166 B
PHP

<?php
$books = simplexml_load_file('book.xml');
$xpath_result = $books->xpath("/books/book/title");
foreach($xpath_result as $entry ) {
print "$entry \n";
}
?>