开发者

NSXMLParser error code=5 all of a sudden

My app reads a few xmls and they all seemed to have been read with no problem by my NSXMLParser with no problem whatsoever until a few days ago. Now two of those xmls throw a code=5 error. From what I have read, this is due to a unicode error, decoding error, invalid data, or invalid character. The actual error from the documentation is NSXMLParserPrematureDocumentEndError.

This is one of the XMLs that causes the error:

<feed>
  <line>
    <feed_id></feed_id>
    <info_feed></info_feed>
    <date_entered></date_entered>
  </line>
</feed>

I haven't touched this code at all, and all of a sudden it 开发者_如何学Gothrew this parser error. Has anyone had this happen too? What breaks my head is that the rest of the xmls are still read with no problems.


My problem was with the actual web project. Something affected the settings for some controllers in the project on the last migration. Moving the xmls to new files in the web project as opposed to the app fixed the issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜