note 46059 added to function.domnode-set-content
| From: | dh at victory-sa dot com | Date: | Tue, 28 Sep 2004 13:00:19 +0000 |
| Subject: | note 46059 added to function.domnode-set-content | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77514@lists.php.net to get a copy of this message | ||
function replace_content( &$node, $new_content )
{
$dom = &$node->owner_document();
$kids = &$node->child_nodes();
foreach ( $kids as $kid )
if ( $kid->node_type() == XML_TEXT_NODE )
$node->remove_child ($kid);
$node->set_content($new_content);
}
----
Manual Page -- http://www.php.net/manual/en/function.domnode-set-content.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46059
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46059&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46059&report=yes
Search -- http://master.php.net/manage/user-notes.php