Edit report at http://bugs.php.net/bug.php?id=53314&edit=1

 ID:                 53314
 Updated by:         fel...@php.net
 Reported by:        122363686 at qq dot com
 Summary:            simplexml_load_string can't parse all tags
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            SimpleXML related
 Operating System:   windows XP
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

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



You can check them using:

var_dump($xml->xpath('//textEntryInteraction'));



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



But this is not a PHP bug, thanks.


Previous Comments:
------------------------------------------------------------------------
[2010-11-15 07:47:23] 122363686 at qq dot com

Description:
------------
run this php,i can't find



<textEntryInteraction>9999</textEntryInteraction>



&



<textEntryInteraction>14285</textEntryInteraction>



in the result.

Test script:
---------------
$string ='<assessmentItem>

  <item Type="assessmentItem">

   
<prompt>中广网快讯(记者张棉棉)据中国之声《央广新闻》报道,国家统计局刚刚公布了最新消费者物价指数和生产者物价指数。</prompt>

  </item>

  

  <item Type="assessmentItem">

    <prompt>0月份居民消费价格指数同比上涨4.4%</prompt>

    <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>

  

  <item Type="assessmentItem">

    <prompt>10月份工业品出厂价格同比上涨5.0%,</prompt>

    <simpleChoice correctResponse="True">

     
涨幅比9月份扩大<textEntryInteraction>9999</textEntryInteraction>百分点。

    </simpleChoice>

    <simpleChoice
correctResponse="False"> 此外,社会消费品零售总额保持较快增长,</simpleChoice>

    <simpleChoice correctResponse="True">

      社会消费品零售总额

      <textEntryInteraction>14285</textEntryInteraction>

      亿元,同比增长18.6%,比9月份回落0.2个百分点。

    </simpleChoice>

  </item>

  

  <item Type="assessmentItem">

   
<prompt>工业生产平稳增长。10月份规模以上工业增加值同比增长13.1%,比9月份回落0.2个百分点。1至10月规模以上工业增加值同比增长16.1%,比1至9月份回落0.2个百分点。1至10月城镇固定资产投资187556亿元,同比增长24.4%,1至9月份回落0.1个百分点。</prompt>

    <textEntryInteraction/>

  </item>

   

</assessmentItem>

';



$xml = simplexml_load_string($string); 

echo '<pre>';

print_r($xml);

Expected result:
----------------
Please parse all tags.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53314&edit=1

Reply via email to