日期:2014-05-18 浏览次数:20748 次
<table>
<tr>
<td>user</td>
<td>cc</td>
</tr>
<tr>
<td>pass</td>
<td>123</td>
</tr>
</table>
Document doc = Jsoup.parseBodyFragment(htmltable);
Elements nodes = doc.select("tr > td:eq(1)");
String user = nodes.get(0).text(); // cc
String pass = nodes.get(1).text(); // 123
Elements nodes = doc.select("table:contains(cc)");