I am trying to retrieve an attribute in an input tag in HTML. My NSLog is coming back null. What's wrong with my syntax? I am trying to retrieve the value for "value=" in the input tag.
Heres the HTML I am parsing:
<input name="hidXMLID" type="hidden" id="hidXMLID" value="0311sg55dbmnk0nsuzoflnij" />
Heres the parser syntax:
NSURL *theURL = [NSURL URLWithString:@"http://www.wccca.com/PITS/"];
NSData *data = [[NSData alloc] initWithContentsOfURL:theURL];
xpathParser = [[TFHpple alloc] initWithHTMLData:data];
NSArray *elements = [xpathParser searchWithXPathQuery:@"//input[@id='hidXMLID']//@value"];
TFHppleElement *element = [elements objectAtIndex:0];
NSString *content = [element content];
NSLog(@"ID = %@",content);