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