想让两个父母(曾祖父母)或两个孩子下来?
<table style="background-color: #008000; border-style: none;" border="0" cellpadding="2" cellspacing="2">
<tr>
<td>
<img height="5" width="5" border="0" src="https://spacer.gif" title="07:00,24hrs: B Shift /.../E704/RS704/Firefighter #2" alt="07:00,24hrs: B Shift /.../E704/RS704/Firefighter #2">
</td>
</tr>
</table>
<img height="2" width="2" border="0" src="https://spacer.gif" alt="">
<img alt="" height="1" width="1" border="0" src="https://spacer.gif">
</td>
<TD ALIGN="RIGHT" VALIGN="TOP" width="17%">
<a href="javascript:void(0)" title="01/15/2013" class="daylink" onClick="return DayClick('01/15/2013');">15</a>
</TD>
<td rowspan="2" width="5">
<img alt="" height="1" width="1" border="0" src="https://spacer.gif">
</td>
</tr>
<tr>
<TD COLSPAN="2">
<TABLE>
<TR>
<TD style="background-color: #41FFB9; " class="calexception">
<a href="javascript:void(0)" onClick="return ShowRemoveExceptionWindow("4A30E80.fre01","3280530");" title="10hrs DetNonEMSStud(10), 07:00 - 17:00" style="color: #000000; text-decoration: none; font-weight: bold;">DetNonEMSStud(10)</a>
</TD>
</TR>
</TABLE>
IOS:
NSString *tutorialsXpathQueryString = @"//table/tr/td";
NSArray *tutorialsNodes = [tutorialsParser searchWithXPathQuery:tutorialsXpathQueryString];
NSLog(@"here is url: %@", tutorialsNodes);
NSMutableArray *newTutorials = [[NSMutableArray alloc] initWithCapacity:0];
for (TFHppleElement *element in tutorialsNodes) {
Tutorial *tutorial = [[Tutorial alloc] init];
[newTutorials addObject:tutorial];
tutorial.url = [element objectForKey:@"style"];
tutorial.title = [[element firstChild] objectForKey:@"title"];
我从中获得风格<td>
和标题<a>
就好了我还需要从中获得风格<table>
我对 obj-c 非常陌生,并且第一次尝试使用 XPATH,任何示例都会很棒!