title: iPhone, parsing HTML with TouchXML
body: <p>has any of you some experience with parsing HTML with the TouchXML lib on the iPhone. I would like to parse some html and therefore try to do the following</p>
  
  <pre><code>self.parser = [[CXMLDocument alloc]initWithData:self.html options:0 error:&amp;error1];
  
   if (error1) {
    NSLog(@"Error: %d", error1);
   }
  
   NSError *error;
  
   NSArray *resultNodes = [[NSArray alloc]init];
  
   NSLog(@"starting to do some crazy parsing");
  
  
   resultNodes = [self.parser nodesForXPath:@"//div" error:&amp;error];
   if (error)
    NSLog(@"initWithData error : %d", error);
  </code></pre>
  
  <p>Unfortunately that does not work at all. And I dont know how to debug this properly. My HTML should be valid. It simply starts with a html tag, meaning there is no doctype. The initWithData method already seems to crash and returns the following error: 
  Error: Error Domain=CXMLErrorDomain Code=-1 "The operation couldn’t be completed. (CXMLErrorDomain error -1.)" If I try to output the second error the app crashes before, probably cause of the fact that initWithData does not work. </p>
  
  <p>Has anyone of you made some experience with parsing HTML with the TouchXML lib? </p>
  
  <p>Thanks for any help!</p>