|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53314 simplexml_load_string can't parse all tags
Submitted: 2010-11-15 07:47 UTC Modified: 2010-11-15 16:38 UTC
From: 122363686 at qq dot com Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.3.3 OS: windows XP
Private report: No CVE-ID: None
 [2010-11-15 07:47 UTC] 122363686 at qq dot com
run this php,i can't find




in the result.

Test script:
$string ='<assessmentItem>
  <item Type="assessmentItem">
  <item Type="assessmentItem">
    <simpleChoice correctResponse="False">1,涨幅比9月份扩大0.8个百分点。</simpleChoice>
    <simpleChoice correctResponse="False">其中,城市上涨4.2%,农村上涨4.7%,食品价格上涨10.1%</simpleChoice>
    <simpleChoice correctResponse="True">非食品价格上涨1.6%,消费品价格上涨5%,服务项目价格上涨2.5%。</simpleChoice>
  <item Type="assessmentItem">
    <simpleChoice correctResponse="True">
    <simpleChoice correctResponse="False"> 此外,社会消费品零售总额保持较快增长,</simpleChoice>
    <simpleChoice correctResponse="True">
  <item Type="assessmentItem">

$xml = simplexml_load_string($string); 
echo '<pre>';

Expected result:
Please parse all tags.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-15 16:38 UTC]
-Status: Open +Status: Bogus
 [2010-11-15 16:38 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

This is a known detail when printing the SimpleXMLElement using print_r(). But the element is there.

You can check them using:

There are others reported related to this, e.g. bug #44973

But this is not a PHP bug, thanks.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 02:01:36 2024 UTC