这是“谁制定法律”的正确 Xpath //p[id='Q'] 即使在 Hpple 中使用这个给我一个 null 值
<html>
<p id="Q">Who Framed the Law?</p>
<p id="A1">Brian</p>
<p id="A2">Ted</p>
<p id="A3">Ki</p>
<p id="A4">Shane Pizza</p>
</html>
NSString *XpathQ =@"//p[id='Q']";
NSArray *tutorialsNodes = [StuffParser searchWithXPathQuery:XpathQ];
NSString *QS=@"";
for (TFHppleElement *element in tutorialsNodes) {
QS=[element content];
NSLog(@"%@",[element content]);
}