title: xmlCtxtGetLastError - Iphone
body: <p>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.</p>
  
  <p>The code is very straight foward, it is a simple XML parsing whose contents were loaded from the web in a separated thread. </p>
  
  <p>Does anybody have alredy encoutered that error??</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT:</p>
  
  <p>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á...</p>
  
  <p>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.</p>