php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13639 CDATA Section Unsupported?
Submitted: 2001-10-11 02:44 UTC Modified: 2001-12-03 00:17 UTC
From: ben at wizzard dot org Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.0CVS-2001-10-11 OS: BSDI BSD/OS 4.0.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ben at wizzard dot org
New email:
PHP Version: OS:

 

 [2001-10-11 02:44 UTC] ben at wizzard dot org
Calling mtree on an XML document that contains a CDATA section returns an incomplete tree prefixed with this warning:

Warning: Unsupported Node type: 4

What follows is a script that tries to make a tree from a well-formed (Brown STG XML validator) XML document. The code works fine on 4.0.6 release and fails as described above on the cvs snap. (php4-200110102100)

<PLAINTEXT>
<?php

$xmlstr = join('',file('http://www.dbq365.com/iml/sample_interview.xml'));

$tree = xmltree($xmlstr);

print_r($tree);

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-11 05:22 UTC] ben at wizzard dot org
Sorry I didn't check this before. If the CDATA section is removed from the sample document, the test script returns what appears to be a complete tree with this warning;

Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0.
I'm finding some other issues with DOM XML in this build, such as the domxml_root function (called as a method) returning an object from the "DomElement" class instead of "DomNode."

I'm don't mean to report two problems at once. I suspect these two issues are both related to getting a CVS snapshot when the DOM XML code is mid-change.
 [2001-11-29 18:48 UTC] mfischer@php.net
Please paste the output of your script with and without CDATA in the xml source.

Feedback.
 [2001-12-03 00:17 UTC] mfischer@php.net
This is supposed to be fixed in CVS.

See http://bugs.php.net/bug.php?id=10667.php
for a working sample (just do a print_r($docTree); ) where to find your CDATA Object.

Closing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 14:01:30 2025 UTC