NSXMLparser 错误代码 5 [英] NSXMLparser errorcode 5

查看:56
本文介绍了NSXMLparser 错误代码 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中使用 Amazon 的 simpledb.解析 xml 时,它给出了代码 5 的错误.IE.NSXMLParserErrorDomain 错误 5.

I'm using Amazon's simpledb in my app. When parsing xml it gives an error with the code 5. ie. NSXMLParserErrorDomain error 5.

有时它工作正常并且导航没有任何显着变化会导致该错误.当我多次重新启动应用程序而不对系统中的代码或导航进行任何更改时,它再次正常工作.我无法弄清楚发生这种情况的原因.

Sometimes it works fine and without any significant change in the navigation is gives that error. Again it works fine when i restart the app several times without doing any changes to the code or navigation in the system. I cant figure out the reason why this happens.

谢谢

推荐答案

调试 101:查看标题以了解错误的含义.

Debugging 101: look at the headers to find what errors mean.

如果你查看 NSXMLParser.h,你会看到错误 5 是 NSXMLParserPrematureDocumentEndError.

If you look at NSXMLParser.h, you will see that error 5 is NSXMLParserPrematureDocumentEndError.

我认为可以肯定地说 XML 文档不完整.你是如何加载文档的?您是否确保在解析之前加载整个文档?

I think it's safe to say that the XML document is not complete. How are you loading the document? Are you ensuring that you load the whole document before parsing it?

这篇关于NSXMLparser 错误代码 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆