note 86258 rejected from class.domnode by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.