[英]get all elements inside selected Element as an array of Element Jsoup android
How to get the all Elements <li>
inside <ul>
in jsoup如何在jsoup中获取
<ul>
中的所有元素<li>
I've select the <ul>
using this code我已经使用此代码选择了
<ul>
Elements elements = document.select("ul.small-list.width300");
so how to got it as ArrayList
of Elements
那么如何将它作为
Elements
ArrayList
Image may describe more :)图片可以描述更多:)
According to the specification, select()
returns Elements
which is a list of Element
s .根据规范,
select()
返回Elements
,它是Element
s的列表。
Add > li
to your selector to get all li
tags directly inside the ul
element:将
> li
添加到您的选择器以直接在ul
元素中获取所有li
标签:
Elements elements = document.select("ul.small-list.width300 > li");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.