mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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
This commit is contained in:
parent
3415d5f66c
commit
50a9f9e59c
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<reference id="ref.simplexml">
|
||||
<title>SimpleXML functions</title>
|
||||
<titleabbrev>SimpleXML</titleabbrev>
|
||||
|
@ -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();
|
|||
</programlisting>
|
||||
<simpara>
|
||||
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.
|
||||
</simpara>
|
||||
</example>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue