簡體   English   中英

如何在Jsoup的elements數組中的類中獲取所有li標簽

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM