类 JsoupUtils
java.lang.Object
org.ddr.poi.html.util.JsoupUtils
JSoup工具类
- 从以下版本开始:
- 2021-03-03
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static org.jsoup.select.Elements选取指定标签的子元素static org.jsoup.select.Elements选取指定标签的子元素static org.jsoup.select.ElementschildRows(org.jsoup.nodes.Element parent) 选取表格的所有行元素static org.jsoup.nodes.ElementfirstChild(org.jsoup.nodes.Element parent, String tag) 选取第一个指定标签的子元素static org.jsoup.nodes.Documentstatic voidselectChildren(org.jsoup.select.Elements collection, org.jsoup.nodes.Element parent, Predicate<org.jsoup.nodes.Element> predicate) 选取符合条件的子元素到目标集合中
-
构造器详细资料
-
JsoupUtils
public JsoupUtils()
-
-
方法详细资料
-
selectChildren
public static void selectChildren(org.jsoup.select.Elements collection, org.jsoup.nodes.Element parent, Predicate<org.jsoup.nodes.Element> predicate) 选取符合条件的子元素到目标集合中- 参数:
collection- 目标集合parent- 父元素predicate- 条件
-
children
选取指定标签的子元素- 参数:
parent- 父元素tag- 标签名称,小写- 返回:
- 子元素集合
-
children
选取指定标签的子元素- 参数:
parent- 父元素tags- 多种标签名称,小写- 返回:
- 子元素集合
-
firstChild
选取第一个指定标签的子元素- 参数:
parent- 父元素tag- 标签名称,小写- 返回:
- 子元素
-
childRows
public static org.jsoup.select.Elements childRows(org.jsoup.nodes.Element parent) 选取表格的所有行元素- 参数:
parent- 表格元素- 返回:
- 行元素集合
-
parse
- 另请参阅:
-
Jsoup.parseBodyFragment(String)Parser.parseBodyFragment(String, String)
-