summaryrefslogtreecommitdiff
path: root/ext/simplexml/examples/xpath.php
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/examples/xpath.php')
-rw-r--r--ext/simplexml/examples/xpath.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/simplexml/examples/xpath.php b/ext/simplexml/examples/xpath.php
new file mode 100644
index 0000000..8fcd987
--- /dev/null
+++ b/ext/simplexml/examples/xpath.php
@@ -0,0 +1,9 @@
+<?php
+$books = simplexml_load_file('book.xml');
+
+$xpath_result = $books->xpath("/books/book/title");
+foreach($xpath_result as $entry ) {
+ print "$entry \n";
+}
+
+?>