我想从表格标签中提取特定数据,我该怎么做呢。
public class Parse1 {
public static void main(String[] args) throws IOException{
Document doc = Jsoup.connect(http://allahabadhighcourt.in/casestatus/caseDetailA.jsp?type=BAIL&num=12801&year=2013").get();
for (Element table : doc.select("table")) {
for (Element row : table.select("tr:gt(2)")) {
Elements tds = row.select("td:not([rowspan])");
System.out.println(tds.get(0).text() + "->" + tds.get(1).text());
}
}
}
}