[英]How to get all li tags within the class in the elements array in Jsoup
I want to extract all li
tags within the specific class div
using Jsoup
. 我想使用
Jsoup
提取特定类div
所有li
标签。
Here is what I have tried so far: 到目前为止,这是我尝试过的:
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.