note 93161 deleted from class.domelement by danbrown

From: Date: Wed, 26 Aug 2009 17:32:48 +0000
Subject: note 93161 deleted from class.domelement by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159904@lists.php.net to get a copy of this message
Note Submitter: sreekanth dayanand ---- Thanks Daniel Morlock for the function i was looking for ,however when i tried it i got this error "Catchable fatal error: Argument 1 passed to DOMDocument::importNode() must be an instance of DOMNode, null given..." I made 2 changes(removed first line and replaced $Body with$Node) and it worked fine. <?php function getInnerHTML($Node) { $Document = new DOMDocument(); $Document->appendChild($Document->importNode($Node,true)); return $Document->saveHTML(); } ?>

« previous php.notes (#159904) next »