你如何解析 TFhpple 中的链接。我的代码返回一个空数组。
NSString *link2=[NSString stringWithFormat:@"/html/body/table/tr[%d]/td[1]/a",i+2];
NSArray *linkedNames = [xpathParser searchWithXPathQuery:link2];
NSLog(@"%@", linkedNames);
信息的源代码是:
<td style="font-size: 12.0pt; color: black; font-weight: 400; text-decoration: none; text-underline-style: none; font-family: Arial Narrow; font-style: normal; text-align: general; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #EAF1DD" width="327">
<a href="race_announcements/12.22.12RA.pdf">Pat Harty Memorial</a></td>
如何访问字符串“pat hardy Memorial”?