note 28175 added to function.domdocument-create-element

From: Date: Sat, 04 Jan 2003 21:40:26 +0000
Subject: note 28175 added to function.domdocument-create-element
Groups: php.notes 
Request: Send a blank email to php-notes+get-41669@lists.php.net to get a copy of this message
It's easier possible since DomNode->append_child($new_element) returns the new child as an object, so you can refer to it immediately. To append a child to the node $existent_node: $new_element = DomDocument->create_element("new_el"); $new_node = $existent_node->append_child("new_el"); see Manual DomNode->append_child() -- http://www.php.net/manual/en/function.domdocument-create-element.php http://master.php.net/manage/user-notes.php?action=edit+28175 http://master.php.net/manage/user-notes.php?action=delete+28175 http://master.php.net/manage/user-notes.php?action=reject+28175

« previous php.notes (#41669) next »