NSXMLparser errorcode 5

2019-07-17 10:35发布

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.

thanks

2条回答
劳资没心,怎么记你
2楼-- · 2019-07-17 11:08

The Best way to remove this error (IPhone -NSXMLParserErrorDomain error 5.)

open http://www.w3schools.com/xml/xml_validator.asp

Validate your XML here because this error mainly Error in XML that you parse in Iphone .

查看更多
姐就是有狂的资本
3楼-- · 2019-07-17 11:18

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

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

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?

查看更多
登录 后发表回答