¡@

Home 

2014/10/15 ¤U¤È 10:16:04

iphone Programming Glossary: xpathparser

parsing HTML on the iPhone [closed]

http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone

language. Code Example #import TFHpple.h NSData data NSData alloc initWithContentsOfFile @ example.html Create parser xpathParser TFHpple alloc initWithHTMLData data Get all the cells of the 2nd row of the 3rd table NSArray elements xpathParser searchWithXPathQuery.. xpathParser TFHpple alloc initWithHTMLData data Get all the cells of the 2nd row of the 3rd table NSArray elements xpathParser searchWithXPathQuery @ table 3 tr 2 td Access the first cell TFHppleElement element elements objectAtIndex 0 Get the text.. cell TFHppleElement element elements objectAtIndex 0 Get the text within the cell tag NSString content element content xpathParser release data release Known issues As hpple is a wrapper over XPathQuery which is another wrapper this option probably is..

memory leaking iPhone sdk?

http://stackoverflow.com/questions/5242444/memory-leaking-iphone-sdk

NSData htmlData NSData dataWithContentsOfURL NSURL URLWithString @ http www.objectgraph.com contact.html TFHpple xpathParser TFHpple alloc initWithHTMLData htmlData NSArray elements xpathParser search @ h3 get the page title TFHppleElement element.. @ http www.objectgraph.com contact.html TFHpple xpathParser TFHpple alloc initWithHTMLData htmlData NSArray elements xpathParser search @ h3 get the page title TFHppleElement element elements objectAtIndex 0 NSString h3Tag element content NSLog @ Html..