ID: 30480
Updated by: [EMAIL PROTECTED]
Reported By: tbrandl at barff dot de
-Status: Open
+Status: Wont fix
Bug Type: DOM XML related
Operating System: WinXP/Linux
PHP Version: 4.3.8
New Comment:
technically there's is no difference between a text and
a cdata section. CDATA is just another way to write text
nodes. Internally it's the same (AFAIK).
We won't fix that.
Previous Comments:
------------------------------------------------------------------------
[2004-10-19 16:20:55] tbrandl at barff dot de
Description:
------------
The first child of <data>, a CDATA-section, is not recognized as such,
but identified as a text object.
According to the documentation, the type should be 4 instead of 3.
works (tested, that is) on 4.3.1, 4.3.6
fails on 4.3.8, 4.3.9
Reproduce code:
---------------
$xmlString = '<?xml version="1.0"?><root><data><![CDATA[Some CData
content]]></data></root>';
$xml = domxml_open_mem($xmlString);
$node = $xml->get_elements_by_tagname('data');
$cdata_section = $node[0]->child_nodes();
echo phpversion();
print_r($cdata_section[0]);
Expected result:
----------------
4.3.6
domcdata Object
(
[type] => 4
[content] => Some CData content
[0] => 3
[1] => 12561912
)
Actual result:
--------------
4.3.8 / 4.3.9
domtext Object
(
[type] => 3
[name] => #text
[content] => Some CData content
[0] => 3
[1] => 140237488
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30480&edit=1