|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-20 08:02 UTC] chregu@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
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 )