cn.wanghaomiao.xpath.util.ScopeEm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JsoupXpath Show documentation
Show all versions of JsoupXpath Show documentation
一个非常好用而且强大的基于xpath的html解析器。html的DOM树生成依赖Jsoup。Lexer 和 Parser基于Antlr4,支持完备的W3C XPATH 1.0标准语法,W3C规范:http://www.w3.org/TR/1999/REC-xpath-19991116。
package cn.wanghaomiao.xpath.util;
/**
* 筛选作用域
* @author 汪浩淼 [ [email protected] ]
* @since 14-3-7 下午4:26
*/
public enum ScopeEm {
INCHILREN("/"), //默认只在子代中筛选,有轴时由轴定义筛选域
RECURSIVE("//"), //向下递归查找
CUR("./"), //当前节点下
CURREC(".//"); //当前节点向下递归
private String val;
private ScopeEm(String type){
this.val = type;
}
public String val() {
return this.val;
}
}