]> granicus.if.org Git - php/commitdiff
update the examples
authorSterling Hughes <sterling@php.net>
Sat, 17 Jan 2004 21:44:22 +0000 (21:44 +0000)
committerSterling Hughes <sterling@php.net>
Sat, 17 Jan 2004 21:44:22 +0000 (21:44 +0000)
ext/simplexml/examples/security.php
ext/simplexml/examples/xpath.php

index 9c3919136176c783f46503f678fc5de531ae8a79..17897b3fd778b493dee47ac6c9694ecc85e8df27 100644 (file)
@@ -2,5 +2,5 @@
 $s = simplexml_load_file('security.xml');
 echo $s->id;
 $s->id = 20;
-$s->to_xml_file('security.new.xml');
+$s->asXML('security.new.xml');
 ?>
index 23253d7b74afe0835a8e802e8118b2f1569b8992..8fcd9878ab58379894a3b4b780dcbf9b8b7282fb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 $books = simplexml_load_file('book.xml');
 
-$xpath_result = $books->xsearch("/books/book/title");
+$xpath_result = $books->xpath("/books/book/title");
 foreach($xpath_result as $entry ) {
     print "$entry \n";
 }