public class XpathEvaluator extends Object
| 构造器和说明 |
|---|
XpathEvaluator() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
callFilterFunc(String funcname,
org.jsoup.nodes.Element el)
调用谓语中函数
|
Object |
callFunc(String funcname,
org.jsoup.select.Elements context)
调用xpath主干上的函数
|
List<Object> |
evaluate(String xpath,
org.jsoup.select.Elements root)
根据xpath求出结果
|
org.jsoup.nodes.Element |
filter(org.jsoup.nodes.Element e,
Node node)
元素过滤器
|
org.jsoup.select.Elements |
getAxisScopeEls(String axis,
org.jsoup.nodes.Element e)
调用轴选择器
|
int |
getElIndex(org.jsoup.nodes.Element e) |
List<Node> |
getXpathNodeTree(String xpath)
获取xpath解析语法树
|
List<Object> |
xpathParser(String xpath,
org.jsoup.select.Elements root)
xpath解析器的总入口,同时预处理,如‘|’
|
public List<Object> xpathParser(String xpath, org.jsoup.select.Elements root) throws NoSuchAxisException, NoSuchFunctionException
xpath - root - NoSuchAxisExceptionNoSuchFunctionExceptionpublic List<Object> evaluate(String xpath, org.jsoup.select.Elements root) throws NoSuchAxisException, NoSuchFunctionException
xpath - root - NoSuchAxisExceptionNoSuchFunctionExceptionpublic org.jsoup.nodes.Element filter(org.jsoup.nodes.Element e,
Node node)
throws NoSuchFunctionException,
NoSuchAxisException
e - node - NoSuchFunctionExceptionNoSuchAxisExceptionpublic org.jsoup.select.Elements getAxisScopeEls(String axis, org.jsoup.nodes.Element e) throws NoSuchAxisException
axis - e - NoSuchAxisExceptionpublic Object callFunc(String funcname, org.jsoup.select.Elements context) throws NoSuchFunctionException
funcname - context - NoSuchFunctionExceptionpublic Object callFilterFunc(String funcname, org.jsoup.nodes.Element el) throws NoSuchFunctionException
funcname - el - NoSuchFunctionExceptionpublic int getElIndex(org.jsoup.nodes.Element e)
Copyright © 2014. All rights reserved.