note 46025 added to function.dom-domdocument-createcdatasection

From: Date: Mon, 27 Sep 2004 11:53:08 +0000
Subject: note 46025 added to function.dom-domdocument-createcdatasection
Groups: php.notes 
Request: Send a blank email to php-notes+get-77429@lists.php.net to get a copy of this message
Note that while there is a distinction at creation between text node (createTextNode) and cdata node (createCDATASection), the textContent property is the one to use equally to return the content of text nodes and cdata nodes, without distinction : <?php $doc->getElementsByTagName("aCDataElement")->item(0)->textContent; $doc->getElementsByTagName("aTextElement")->item(0)->textContent; echo $str; ?> ---- Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-createcdatasection.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46025 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46025&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46025&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77429) next »