From 50a9f9e59c3351087c26edb036f97586cff97543 Mon Sep 17 00:00:00 2001 From: Ken Date: Sun, 18 Jul 2004 17:02:11 +0000 Subject: [PATCH] fixed path and changed to using an existing element # manicdepressive at mindless dot com git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@163572 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/simplexml/reference.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/simplexml/reference.xml b/reference/simplexml/reference.xml index 1f0889d82c..952f3e7710 100644 --- a/reference/simplexml/reference.xml +++ b/reference/simplexml/reference.xml @@ -1,5 +1,5 @@ - + SimpleXML functions SimpleXML @@ -207,7 +207,7 @@ foreach ($xml->xpath('//character') as $character) { include 'example.php'; $xml = simplexml_load_string($xmlstr); -$xml->movie[0]->actor[0]->age = '21'; +$xml->movie[0]->characters->character[0]->name = 'Miss Coder'; echo $xml->asXML(); ?> @@ -215,7 +215,7 @@ echo $xml->asXML(); The above code will output a new XML document, just like the original, - except that the new XML will define Ms. Coder's age as 21. + except that the new XML will change Ms. Coder to Miss Coder.