note 52459 deleted from ref.dom by didou

From: Date: Mon, 13 Mar 2006 00:02:05 +0000
Subject: note 52459 deleted from ref.dom by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-105396@lists.php.net to get a copy of this message
Note Submitter: sofa77 at gmx dot de ---- please take account, that the following - usually working check - won't work as expected. i was looking for a too long time for an error, where no error were. <?php $last = null; $dom = new DOMDocument; $first = $dom->createElement('firstEl'); $last = $dom->appendChild($first); $second = $dom->createElement('secondEl'); $last = $last->appendChild($second); echo htmlspecialchars($dom->saveXML()); echo $last->parentNode->nodeName; if(!isset($last->parentNode->nodeName)) { trigger_error('WRONG NOTICE: no parent', E_USER_NOTICE); } if(!$last->parentNode) { trigger_error('no parent', E_USER_NOTICE); } if(!$last->parentNode->nodeName) { trigger_error('no parent', E_USER_NOTICE); } ?>

« previous php.notes (#105396) next »