note 24936 added to function.domnode-set-content

From: Date: Thu, 05 Sep 2002 12:34:47 +0000
Subject: note 24936 added to function.domnode-set-content
Groups: php.notes 
Request: Send a blank email to php-notes+get-36164@lists.php.net to get a copy of this message
As of v4.2.2 of PHP, with libxml version 2.4.19, set_content does not replace the content of the node, but only appends to it. Bug, feature, who knows! To replace the content of a node, create a new node, copy the properties and children of the old node to the new one, then set the content of the new one and use replace_node to put it back into the DoM. Daniel -- http://www.php.net/manual/en/function.domnode-set-content.php http://master.php.net/manage/user-notes.php?action=edit+24936 http://master.php.net/manage/user-notes.php?action=delete+24936 http://master.php.net/manage/user-notes.php?action=reject+24936

« previous php.notes (#36164) next »