ID: 31306 Updated by: [EMAIL PROTECTED] Reported By: js at enradia dot com -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: gentoo linux PHP Version: 5.0.3 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Behavior is per the DOM specs: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent Previous Comments: ------------------------------------------------------------------------ [2004-12-27 02:46:18] js at enradia dot com Description: ------------ using the method textContent on a node using teh php 5 DOM retrieves the cdata for every child as well - that doesn't seem right. it certainly is useless Reproduce code: --------------- XML -------------- <?xml version="1.0" ?> <base> I see <item> stuff </item> <item> and </item> <item> more <subitem>stuff</subitem> </item> </base> PHP ----------- $root = $this->registry->getElementsByTagName('base'); foreach($root as $node) { print $node->textContent . " "; } Expected result: ---------------- I see Actual result: -------------- I see stuff and more stuff ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31306&edit=1