note 15832 added to function.xmldoc
| From: | php4 at meta-craft dot com | Date: | Thu, 04 Oct 2001 13:13:39 +0000 |
| Subject: | note 15832 added to function.xmldoc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18562@lists.php.net to get a copy of this message | ||
don't forget, if you want to tack on new elements to the xml object you've just created,
to establish the root node...
ie, $xml = xmldoc('<?xml version="1.0"?><root_node>My
data</root_node>')
// i want to add element 'foo'
$rootObj = $xml->root();
$rootObj->new_child("foo", "bar");
this is a pretty obvious process, but not clearly stated in the docs.
--
http://www.php.net/manual/en/function.xmldoc.php
http://master.php.net/manage/user-notes.php?action=edit+15832
http://master.php.net/manage/user-notes.php?action=delete+15832
http://master.php.net/manage/user-notes.php?action=reject+15832