<tr>
<td class="whitetext" width="10%">2015020743</td>
<td class="whitetext" width="35%">操作系统教程.5版 / 费翔林,骆斌编著</td>
<td class="whitetext" width="13%">2016-09-01</td>
<td class="whitetext" width="13%"><font color="red">2016-10-02 </font></td>
<td width="6%" align="center" class="whitetext">0</td>
<td class="whitetext" width="15%">自科文献二室[2楼西部]</td>
<td width="13%" align="center" class="whitetext">无</td>
<td width="5%" height="35" class="whitetext">
<p id="2">
<input title="renew" class="btn btn-success" type="button" value="续借" onclick="getInLib('2015020743','5F071A7E','2');" disabled>
</p>
<p id="2015020743"></p></td>
</tr>
html是这个
Document doc = Jsoup.parse(html);
Elements eles = doc.getElementsByTag("td");
获取不到元素
Elements eles = doc.getElementsByClass("whitetext");
也获取不到
请问怎么解决
Because
tr
跟td
都是table
的子标签,你这标签不是标准的html
,所以他在parse的时候没有正确的解析.亲测头尾加上
table
tag is enough.