|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10767 CDATA sections not type'd or content'd
Submitted: 2001-05-09 17:42 UTC Modified: 2001-12-03 00:15 UTC
From: gregory at 9voltnet dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.0.5 OS: Linux RH 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gregory at 9voltnet dot com
New email:
PHP Version: OS:


 [2001-05-09 17:42 UTC] gregory at 9voltnet dot com
well, using the dom and libxml 2.3.8 (and libxml 1 was required in 4.0.4pl1 too) it (getting CDATA content) worked in 4.0.4pl1.

the content attribute of the node used to contain all the data in a CDATA section of an XML doc.  now, the content attribute in 4.0.5 with libxml2 is empty.  completely.  even more, the type attribute it claims the element containing the CDATA is a 1 (?_ELEMENT i belive) as opposed to 3 or 4 (?_CDATA_SECTION i believe).  regardless, the content is empty and seemingly not recoverable.  this appears in both the standard node querying as well as XPath.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-22 03:32 UTC]
Can you try with latest RC and see if it works


 [2001-12-03 00:15 UTC]
Syntax for CDATA has changed (I beelieve), they're now part of the DOM (DomCData Object) and can be accessed via the children() method of the parent object.

See for a working sample (just do a print_r($docTree); ).

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 03:03:42 2023 UTC