public class CommonUtil
extends java.lang.Object
| 构造器和说明 |
|---|
CommonUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.jsoup.select.Elements |
followingSibling(org.jsoup.nodes.Element el) |
static int |
getElIndexInSameTags(org.jsoup.nodes.Element e,
Scope scope)
获取同名元素在同胞中的index
|
static int |
getIndexInContext(Scope scope,
org.jsoup.nodes.Element el) |
static int |
getJxSameTagIndexInSiblings(org.jsoup.nodes.Element ori) |
static int |
getJxSameTagNumsInSiblings(org.jsoup.nodes.Element ori) |
static org.jsoup.select.Elements |
precedingSibling(org.jsoup.nodes.Element el) |
static int |
sameTagElNums(org.jsoup.nodes.Element e,
Scope scope)
获取同胞中同名元素的数量
Jsoup文档模型中,空白行和元素均属于同胞也有自己独立的siblingIndex,这对于xpath语法统计,空白行等是没有任何意义的,不应该计入siblingIndex。
|
static void |
setSameTagIndexInSiblings(org.jsoup.nodes.Element ori,
int index) |
static void |
setSameTagNumsInSiblings(org.jsoup.nodes.Element ori,
int nums) |
public static int getElIndexInSameTags(org.jsoup.nodes.Element e,
Scope scope)
e - public static int sameTagElNums(org.jsoup.nodes.Element e,
Scope scope)
public static int getIndexInContext(Scope scope, org.jsoup.nodes.Element el)
public static org.jsoup.select.Elements followingSibling(org.jsoup.nodes.Element el)
public static org.jsoup.select.Elements precedingSibling(org.jsoup.nodes.Element el)
public static void setSameTagIndexInSiblings(org.jsoup.nodes.Element ori,
int index)
public static int getJxSameTagIndexInSiblings(org.jsoup.nodes.Element ori)
public static void setSameTagNumsInSiblings(org.jsoup.nodes.Element ori,
int nums)
public static int getJxSameTagNumsInSiblings(org.jsoup.nodes.Element ori)
Copyright © 2023. All Rights Reserved.