[英]How to get all li tags within the class in the elements array in Jsoup
我想使用Jsoup
提取特定類div
所有li
標簽。
到目前為止,這是我嘗試過的:
Elements ele=doc.getElementsByClass("div.solution>div#li");
String text="";
for (Element x : ele) {
text= text.concat(x.text()+"\n");
}
嘗試這個:
element.select("div[class=yourClass]")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.