|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-27 12:28 UTC] rrichards@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 12:00:01 2025 UTC |
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