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.