Wednesday 15 February 2012

iphone - Hpple-All Nodes was nil -


I'm very new in Objective-C, but with regular C is good and I'm looking into iPhone development. Right now all my nodes in the school's grading system are zero I know that they are in perfect xpath because // table [@ class = 'grid'] / tbody / tr [4] / td [16] Show in the Firefox Express Checker plugin correctly I know that the NSDT obtained from the web page is correct because I did it NSODog. But for some reason I still end up with zero nodes.

  Course 2 * Fillows (Entry Line) {NSDRL * CURL = [NSD URL URL String: @ "My School Site Is Here"]; NSData * CHtmlData = [NSData dataWithContentsOfURL: CUrl]; TFHpple * StuffParser = [TFHpple hppleWithHTMLData: CHtmlData]; NSString * XpathQ = @ "// table [@ class = 'grid'] / Toby / Tr [5] / TD [16] / a"; NSArray * Tutorial nodes = [StaffPersearchWithxpathQp: ExhaustQue]; / * (TFHppleElement * String Tutorial Nodes) {NSLog (@ "% @", [element content]); } * / NSString * XpathQ2 = @ "// table [@ class = 'grid'] / Toby / Tr [5] / TD [16] / a"; NSArray * Tutorial nodes 2 = [[StuffPerser SearchWithexpathQuality: ExhaustQ 2]; Course 2 * Core * [[Course 2 Alok] Init]; // NSMutableArray * newTutorials = [[NSMutableArray alloc] initWithCapacity: 0]; (TFHppleElement * element in tutorial nodes) {COUR.grade = [element content]; COUR.teacherPage = [NSURL URLWithString: [element objectForKey: @ "href"]]; } (TFHppleElement * Tutorial nodes in element2 2) {COUR.Class = [[element2 firstchild] content]; } Return Koor; }    

attempt to remove the tab from your XPath query Do Ie, it looks like // table [@ class = 'grid'] / tr [4] / td [16] . I had a similar problem with HPPL and give me all the tags s. Had to overcome

No comments:

Post a Comment