开发者

Html file parsing in iPhone sdk

How can I parse an HTML file under开发者_高级运维 iOS? Any tutorials or sample code available?


Check out NSXMLParser. It's Apple's class for parsing XML documents. Should be a good start, if you know something about the format of the document in advance


Use XPathQuery to parse HTML or XML conveniently

  1. Google XPathQuery for iphone
  2. download XPathQuery.h and XPathQuery.m
  3. include both files in the project.
  4. Use the following method to parse HTML.
NSArray *PerformHTMLXPathQuery(NSData *document, NSString *query);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜