Parsing Html file in iPhone sdk

How can I parse an HTML file under iOS? Are any tutorials or code examples available?

+4
source share
2 answers

Check out NSXMLParser . This is the Apple class for parsing XML documents. It should be a good start if you know something about the document format in advance.

+2
source

Use XPathQuery to conveniently parse HTML or XML

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

Source: https://habr.com/ru/post/1338983/


All Articles