0

我正在解析 xml 数据,但是当我解析 xml 时,它会引发错误 SIGABRT

<?xml version="1.0" encoding="utf-8"?>
 <questions>
    <question>
          <questionid>1402</questionid>
          <templateid>1</templateid>
          <questionname><![CDATA[<p><span style="font-size: small;">Subtract (<img   id="MathMLEq1" src="url of image" alt="" width="105" height="21" border="0" /> )from (<img  id="MathMLEq2" src="Url of image" alt="" width="115" height="20" border="0" /> )</span></p><p>&nbsp;</p>]]>
          </questionname>
          <questiontypeid>1</questiontypeid>
      </question>
   <questions>

我将所有内容都放在 CDATA 中,那么为什么它会引发错误?

堆栈跟踪

2013-01-02 16:08:23.194 EduApp[1535:15503] *** Terminating app due to uncaught exception  'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x2c50022 0x326dcd6 0x2c3cd88 0x210c4 0x1e1de 0x1d50a1e 0x1d50d11 0x1d628fd 0x1d62aef 0x1d62dbb 0x1d6385f 0x1d63e06 0x1d63a24 0x1c42d 0x25af85d 0x2c24936 0x2c243d7 0x2b87790 0x2b86d84 0x2b86c9b  0x44767d8 0x447688a 0x1c89626 0x253d 0x24a5 0x1)
terminate called throwing an exception
4

0 回答 0