展开全部
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
public class Test {
public static void main(String[] args) {
String str = "
user | cc |
pass | 123 |
";
Document doc = Jsoup.parse(str);
Elements trs = doc.select("table").select("tr");
for(int i = 0;i
Elements tds = trs.get(i).select("td");
for(int j = 0;j
String text = tds.get(j).text();
System.out.println(text);
}
}
}
}
运行e5a48de588b662616964757a686964616f31333332623936结果 :user
cc
pass
123