Reputation:
I am accessing a web page using NSURLConnection and have a HTML data downloaded programmatically in my iPhone client application. I want to parse and pick some description data from the HTML tags..It is too dirty tags and my data is also here and there. I would like to ask you, is there a standard or easy way of parsing of HTML data on iPhone development. P.S: I know about XML parsing.
thanks.
Clave/
Upvotes: 1
Views: 3679
Reputation: 1641
I've used succesfully project GDataXML-HTML, that is very easy to use and also available from cocoapods
Upvotes: 1
Reputation: 32316
libxml2.2
comes in the SDK, and libxml/HTMLparser.h
claims the following:
This module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view.
It shouldn't be too difficult to use that, but if all else fails you could always load up a UIWebView
in the background and have it load the content for you.
Upvotes: 0