views:

18

answers:

2

Hi,

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 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.

A: 

Maybe its because you are doing lengthy operations in UI Thread. You should post your code so we can help you.

Amure Pinho
A: 

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.

Raphael Kohn