When i try to parse an xml using nsxmlparser, this error code is showing up, what is this error code pointing to
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
NSXMLParser reference, Parser Error Constants:
NSXMLParserPrematureDocumentEndError = 5
//The document ended unexpectedly.
You're likely trying to parse invalid xml document.
回答2:
I ran into the same issue. It turned out it was the encoding. I used the sign "€", which wasn't properly encoded.