I have the following code:
-(void)getHTMLData {
NSData *data = [[NSData alloc] initWithContentsOfFile:@"example.html"];
TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:data];
//Get all the cells of the 2nd row of the 3rd table
NSArray *elements = [xpathParser search:@"//table[3]/tr[2]/td"]; // "//a" -- all a tags
TFHppleElement *element = [elements objectAtIndex:0];
NSString *content = [element content];
[xpathParser release];
[data release];
NSLog(@"tagName:%@", content);
}
but anytime it runs, it stops at the line with a SIGABRT error:
NSArray *elements = [xpathParser search:@"//table[3]/tr[2]/td"];
Any help is much appreciated.