note 41860 deleted from ref.simplexml by kennyt

From: Date: Sun, 18 Jul 2004 16:56:32 +0000
Subject: note 41860 deleted from ref.simplexml by kennyt
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73491@lists.php.net to get a copy of this message
Note Submitter: manicdepressive@mindless.com ---- I had to make adjustments to get the above 'Setting Values' example to work on WindowsXP with PHP5rc4: I changed the 'path' to follow more accurately the structure of the document, which it does not appear to do in the example. Also, thus far with my installation it appears that you can only set values of preexisting nodes ('name'), and not add a new node ('age'). <?php $xml->movie[0]->actor[0]->age = '21'; // didn't work -- throws fatal error $xml->movie[0]->characters[0]->character[0]->age = '21' ; // didn't work $xml->movie[0]->characters[0]->character[0]->name = 'BEAVIS'; //works ?> code till dawn! mark meves!

« previous php.notes (#73491) next »