note 56103 added to function.dom-domnode-removechild

From: Date: Tue, 23 Aug 2005 17:10:47 +0000
Subject: note 56103 added to function.dom-domnode-removechild
Groups: php.notes 
Request: Send a blank email to php-notes+get-94087@lists.php.net to get a copy of this message
This might be obvious, but might help someone as well... If you simply have a node that you need to remove (perhaps from an xpath) and don't know the parent node offhand (the examples seem to assume you have the parent in a variable), then you can do something easy like this... $node->parentNode->removeChild($node); parentNode is a scalar property of the Element. Hope that helps. -- Blaine Garrett Executive Director of the Art Attack http://theartattack.org ---- Manual Page -- http://www.php.net/manual/en/function.dom-domnode-removechild.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56103 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56103&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56103&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56103&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56103&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56103&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56103&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56103&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94087) next »