|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27517 SimpleXML dont get CDATA
Submitted: 2004-03-07 09:30 UTC Modified: 2004-06-21 19:36 UTC
From: cyppe at telia dot com Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.0.0b4 (beta4) OS: linux
Private report: No CVE-ID: None
 [2004-03-07 09:30 UTC] cyppe at telia dot com
SimpleXML seems to work all good, except for getting a CDATA node, it returns nothing.

Really nothing more to say.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-07 09:41 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2004-03-13 05:01 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2004-03-31 19:49 UTC] jaba at inbox dot lv
SimpleXML does support CDATA, but it fails to show nodes consisting of CDATA when you call print_r() or var_dump().

It only says [tag_name] => simplexml_element Object

When you call $xmlobject->[tag_name] then you get what you expect, but with print_r() - no!
 [2004-03-31 19:51 UTC] jaba at inbox dot lv
Just wanted to add that this is PHP5 RC1 running on Windows XP
 [2004-06-21 19:24 UTC] schmich at uiuc dot edu
Same behavior confirmed with PHP5 RC3 on linux
 [2004-06-21 19:36 UTC]
SimpleXML overloads its objects, so they don't work correctly when you call print_r() and friends.

You should use the asXML() method if you're interested in viewing a text version of the object.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 13:01:29 2024 UTC