Make some changes in the code to get further on the hierarchy and it worked on your html sample. Note: I'm appending all the entry-content in a single NSMutableString to make it easier. Like I warned you in the comment, use it with caution. :-)
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"html"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
TFHpple *detailParser = [TFHpple hppleWithHTMLData:data];
NSString *xpathQueryString = @"//div[@class='entry-content']";
NSArray *node = [detailParser searchWithXPathQuery:xpathQueryString];
NSMutableString *test = [[NSMutableString alloc] initWithString:@""];
for (TFHppleElement *element in node) {
for (TFHppleElement *child in element.children) {
if (child.content != nil) {
[test appendString:child.content];
}
if ([child.children count]!= 0) {
for (TFHppleElement *grandchild in child.children) {
if (grandchild.content != nil) {
[test appendString:grandchild.content];
}
for (TFHppleElement *greatgrandchild in grandchild.children) {
if (greatgrandchild.content != nil) {
[test appendString:greatgrandchild.content];
}
for (TFHppleElement *greatgreatgrandchild in greatgrandchild.children) {
if (greatgreatgrandchild.text != nil) {
[test appendString:greatgreatgrandchild.text];
}
if (greatgreatgrandchild.content != nil) {
[test appendString:greatgreatgrandchild.content];
}
}
}
}
}
}
}
NSLog(@"test = %@", test);