note 86258 rejected from class.domnode by danbrown

From: Date: Thu, 09 Oct 2008 19:13:18 +0000
Subject: note 86258 rejected from class.domnode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145223@lists.php.net to get a copy of this message
Note Submitter: josh at coady dot us ---- How do you check if a DOMNode is still valid? $node->parentNode->removeChild($node); After that line, isset($node) == true (because $node is still an object of a type of DOMNode, just with no properties) I can do isset($node->nodeValue), but that results in a warning: Warning: Couldn't fetch DOMElement. Node no longer exists Is there a better way to check to see if a node is still valid? I would especially like one that doesnt result in a warning or notice.

« previous php.notes (#145223) next »