开发者

xmlCtxtGetLastError - Iphone

开发者 https://www.devze.com 2022-12-22 19:58 出处:网络
I have been programming with NSXMLParser for quite a while and lately, I came out with this error. The strangiest thing is that it only happens in debug mode. Once I load the App in Simulator and run

I have been programming with NSXMLParser for quite a while and lately, I came out with this error. The strangiest thing is that it only happens in debug mode. Once I load the App in Simulator and run it from Simulator (without Xcode involved), it runs fine.

The code is very straight foward, it is a simple XML parsing whose contents were loaded from the web in a separated thread.

Does anybody have alredy encoutered that error??

Thanks in advance.

EDIT:

In time I realized that this error occur when you have a bad formated XML Document. In my case, I was extracting some of the contents of an HTML Page and parsing the resulting string, but this string was开发者_如何学Python not allways well formed. A little modification an voilá...

Ensure that your documents are well formed when parsing or you may have the same mistake... PS: The parser error method did not catch this error.


In time I realized that this error occur when you have a bad formated XML Document. In my case, I was extracting some of the contents of an HTML Page and parsing the resulting string, but this string was not allways well formed. A little modification an voilá...

Ensure that your documents are well formed when parsing or you may have the same mistake... PS: The parser error method did not catch this error.

0

精彩评论

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