程序包 org.anyline.util
类 DomUtil
java.lang.Object
org.anyline.util.DomUtil
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static List<org.dom4j.Element>当前节点后的所有节点static List<org.dom4j.Element>当前节点前的所有节点static List<org.dom4j.Element>start与end之间的所有节点static org.dom4j.Element根据标签name搜索elementstatic org.dom4j.Element根据属性值搜索elementstatic org.dom4j.Elementstatic org.dom4j.Element根据标签name搜索elementstatic org.dom4j.Element根据标签name以及属性值搜索elementstatic List<org.dom4j.Element>static List<org.dom4j.Element>static List<org.dom4j.Element>根据属性值搜索elementstatic List<org.dom4j.Element>static List<org.dom4j.Element>static List<org.dom4j.Element>根据标签name搜索elementstatic List<org.dom4j.Element>根据标签name以及属性值搜索elementstatic Stringstatic Stringformat(org.dom4j.Document document) static void删除parent下的removes节点
-
构造器详细资料
-
DomUtil
public DomUtil()
-
-
方法详细资料
-
element
根据标签name搜索element- 参数:
root- 根节点tags- 标签名(不含namespace)- 返回:
- Element
-
element
根据标签name搜索element- 参数:
root- 根节点tags- 标签名(不含namespace)- 返回:
- Element
-
elements
public static List<org.dom4j.Element> elements(org.dom4j.Element root, List<String> tags, boolean recursion) 根据标签name搜索element- 参数:
root- 根节点tags- 标签名(不含namespace)recursion- 递归查询子类- 返回:
- List
-
elements
-
elements
-
elements
-
element
public static org.dom4j.Element element(org.dom4j.Element root, List<String> tags, String attribute, String value) 根据标签name以及属性值搜索element- 参数:
root- 根节点tags- 标签名(不含namespace)attribute- 属性名(不含namespace)value- 属性值- 返回:
- Element
-
element
-
elements
public static List<org.dom4j.Element> elements(org.dom4j.Element root, List<String> tags, String attribute, String value) 根据标签name以及属性值搜索element- 参数:
root- 根节点tags- 标签名(不含namespace)attribute- 属性名(不含namespace)value- 属性值- 返回:
- List
-
elements
-
element
根据属性值搜索element- 参数:
root- 根节点attribute- 属性名(不含namespace)value- 属性值- 返回:
- Element
-
elements
public static List<org.dom4j.Element> elements(org.dom4j.Element root, String attribute, String value) 根据属性值搜索element- 参数:
root- 根节点attribute- 属性名(不含namespace)value- 属性值- 返回:
- List
-
format
-
format
-
afters
当前节点后的所有节点- 参数:
element- elementtag- 过滤标签- 返回:
- List
-
befores
当前节点前的所有节点- 参数:
element- elementtag- 过滤标签- 返回:
- List
-
betweens
public static List<org.dom4j.Element> betweens(org.dom4j.Element start, org.dom4j.Element end, String... tags) start与end之间的所有节点- 参数:
start- 开始end- 结束tags- 过滤- 返回:
- List
-
remove
删除parent下的removes节点- 参数:
parent- parentremoves- removes
-