Bug #53314 [NEW]: simplexml_load_string can't parse all tags

From: Date: Mon, 15 Nov 2010 06:47:24 +0000
Subject: Bug #53314 [NEW]: simplexml_load_string can't parse all tags
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156034@lists.php.net to get a copy of this message
From:             
Operating system: windows XP
PHP version:      5.3.3
Package:          SimpleXML related
Bug Type:         Bug
Bug description:simplexml_load_string can't parse all tags

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 bug report at http://bugs.php.net/bug.php?id=53314&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=53314&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=53314&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=53314&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=53314&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53314&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=53314&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=53314&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=53314&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=53314&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=53314&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=53314&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=53314&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=53314&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=53314&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53314&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53314&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=53314&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=53314&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=53314&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=53314&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=53314&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#156034) next »