title: Example for parsing (X)Html with libxml2 in iOS
body: <p>Recently I started to play around with the libxml2 lib within an iOS iPhone project. I read some useful links, like: </p>
  
  <p><a href="http://laurentparenteau.com/blog/2009/12/parsing-xhtml-in-c-a-libxml2-tutorial/" rel="nofollow">http://laurentparenteau.com/blog/2009/12/parsing-xhtml-in-c-a-libxml2-tutorial/</a></p>
  
  <p>and some very nice post here: </p>
  
  <p><a href="http://bill.dudney.net/roller/objc/entry/libxml2_push_parsing" rel="nofollow">http://bill.dudney.net/roller/objc/entry/libxml2_push_parsing</a></p>
  
  <p>I managed to retrieve remote html (with ASIHTTPRequest) and successfully get the data (NSData) on the 'didReceiveData' event pushed to a wrapper class containing a parser created with <strong>htmlCreatePushParserCtxt</strong> (SAX style). I get nicely the startDocument
  and endDocument callbacks. In the 'startElement' and 'characters' callbacks,  I print the ' localname' paramater (<strong>const xmlChar</strong>). In the console I see that it finds 'html', then 'body', then some 'p' tag, but then I get lots of unrecognizable characters (sometimese it looks even like Chinese..)...</p>
  
  <p>Anyway, before getting into to much code details, I want to ask if anyone has a working example of parsing (x)html with libxml2 in an objective-c based projet? I tried googling for more then the 2 mentioned links, but until now no luck.</p>