解决方案 »
- android'火焰.烟雾传感器数据接收处理
- SQLite里,我用保存存储路径大方式存储了很多图片,注意不止一张,想请教一下怎样读出并在GridView中显示
- 【在线等】用Eclipse调试service的问题
- Notification的发布
- Android 继承BaseAdapter中如何实例化SQLiteOpenHelper
- 调试程序时怎样终止?
- 关于Android 打开输入法网页上移问题
- 为什么导入一个AS项目后,import中的好多包都报红
- 关于setImageResource更换图片的问题
- 问一个JSON解析的问题
- PullToRefreshListView刷新到底部之后,会跳到开始的item,求解决方法
- 如何修改 Android系统里的/sys/class/net/wlan0/address 文件内容?Java代码应该咋写?谢谢,请大家不吝赐教
<table>
0
</table>
<table>
1
</table>
<table>
2 你的数据
</table>
</div>
Elements elements = null;
String html="<table cellspacing=\"0\" cellpadding=\"0\" width=\"98%\" border=\"0\">";
html+="<tbody>";
html+="<tr>";
html+="<td colspan=\"3\" class=\"listTitle\" style=\"text-align: left; border-bottom: 1px #999999 solid;";
html+=" margin-top: 10px; line-height: 30px; vertical-align: 80%;\">";
html+=" 通知公告";
html+="</td>";
html+="</tr>";
html+=" <!--列表部分-->";
html+="<tr>";
html+="<td class=\"line\" align=\"center\" valign=\"top\" width=\"4%\" style=\"border-bottom: #a0a0a0 1px dashed;";
html+=" line-height: 25px\">";
html+="<img src=\"../../content/images/main_07.jpg\" style=\"vertical-align: top;\" />";
html+="</td>";
html+="<td align=\"left\" style=\"border-bottom: #a0a0a0 1px dashed; line-height: 25px\">";
html+="<a class=\"LinkStyle\" target=\"_blank\" href=\"/home/detail/3b110e4b-a918-419b-86d7-73221739b6da\">";
html+="第三届北京市大学生书法大赛校内预选赛通知</a>";
html+="</td>";
html+="<td align=\"left\" valign=\"top\" width=\"80px\" style=\"border-bottom: #a0a0a0 1px dashed;";
html+="line-height: 25px\">";
html+="[14.03.07]";
html+=" </td>";
html+="</tr>";
html+="<!-- 列表结束-->";
html+="<tr>";
html+="<td class=\"line\" align=\"center\" valign=\"top\" width=\"4%\" style=\"border-bottom: #a0a0a0 1px dashed;";
html+="line-height: 25px\">";
html+=" <img src=\"../../content/images/main_07.jpg\" style=\"vertical-align: top;\" />";
html+="</td>";
html+="<td align=\"left\" style=\"border-bottom: #a0a0a0 1px dashed; line-height: 25px\">";
html+="<a class=\"LinkStyle\" target=\"_blank\" href=\"/home/detail/58955942-a526-4805-9026-5b511af26d8d\">";
html+="第五期人际关系体验及成长小组招募(仅限雁栖湖校区)</a>";
html+="</td>";
html+="<td align=\"left\" valign=\"top\" width=\"80px\" style=\"border-bottom: #a0a0a0 1px dashed;";
html+="line-height: 25px\">";
html+="[14.02.26]";
html+="</td>";
html+="</tr>";
html+="<!-- 列表结束-->";
html+="<tr>";
html+="<td class=\"line\" align=\"center\" valign=\"top\" width=\"4%\" style=\"border-bottom: #a0a0a0 1px dashed;";
html+="line-height: 25px\">";
html+="<img src=\"../../content/images/main_07.jpg\" style=\"vertical-align: top;\" />";
html+="</td>";
html+="<td align=\"left\" style=\"border-bottom: #a0a0a0 1px dashed; line-height: 25px\">";
html+="<a class=\"LinkStyle\" target=\"_blank\" href=\"/home/detail/1945d023-b211-43d5-bdac-7f01169342f7\">";
html+=" 第四期人际关系体验及成长小组招募</a>";
html+="</td>";
html+="<td align=\"left\" valign=\"top\" width=\"80px\" style=\"border-bottom: #a0a0a0 1px dashed;";
html+=" line-height: 25px\">";
html+=" [14.02.26]";
html+="</td>";
html+="</tr>";
html+="</tbody>";
html+="</table>";
doc = Jsoup.parse(html) ;
elements = doc.select("table tr td:gt(1)");
for (Element p : elements) {
System.out.println(p.parent().select("td a").attr("href")+"-->"+p.parent().select("td a").text()+"---->"+p.parent().select("td:eq(2)").text());
}