<tr valign="middle" align="center">
<td><b>someNumbers</b></td>
<td width="22" height="22" background="..." class="SomeIntrestingClass">xxxxx</td>
<td width="22" height="22" background="..." class="SomeIntrestingClass">xgdsx</td>
<td width="22" height="22" background="..." class="SomeIntrestingClass">xyzzx</td>
<td width="22"> </td></tr>
我正在做一个需要从网站的数据的应用程序。我需要提取'someNumbers'中的值以及td ex中的值:'xyzzx'...
我遇到的问题是'someNumbers没有类,所以我尝试使用doc.getElementsByAttributeValue(key, value)
但该文档的其他部分的属性相同。我怎样才能使用JSoup或任何其他明智的想法提取这些值?感谢您的任何建议。刮Html属性
你可以选择所有的'td'并只获取文本内容吗? – nhahtdh
我可以选择td标签。但是,这将导致1k结果,我只使用'someNumbers'将很难区分的30%。但生病尝试。 – wtsang02