public class DomUtil extends Object
| 构造器和说明 |
|---|
DomUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<org.dom4j.Element> |
afters(org.dom4j.Element element,
String tag)
当前节点后的所有节点
|
static List<org.dom4j.Element> |
befores(org.dom4j.Element element,
String tag)
当前节点前的所有节点
|
static List<org.dom4j.Element> |
betweens(org.dom4j.Element start,
org.dom4j.Element end,
String... tags)
start与end之间的所有节点
|
static boolean |
contains(org.dom4j.Element box,
org.dom4j.Element item) |
static org.dom4j.Element |
element(boolean shelf,
org.dom4j.Element root,
List<String> tags)
根据标签name搜索element
|
static org.dom4j.Element |
element(boolean shelf,
org.dom4j.Element root,
String tags)
根据标签name搜索element
|
static org.dom4j.Element |
element(org.dom4j.Element root,
List<String> tags)
根据标签name搜索element
|
static org.dom4j.Element |
element(org.dom4j.Element root,
List<String> tags,
String attribute,
String value)
根据标签name以及属性值搜索element
|
static org.dom4j.Element |
element(org.dom4j.Element root,
String tags)
根据标签name搜索element
|
static org.dom4j.Element |
element(org.dom4j.Element root,
String attribute,
String value)
根据属性值搜索element
|
static org.dom4j.Element |
element(org.dom4j.Element root,
String tags,
String attribute,
String value) |
static List<org.dom4j.Element> |
elements(boolean shelf,
org.dom4j.Element root,
List<String> tags) |
static List<org.dom4j.Element> |
elements(boolean shelf,
org.dom4j.Element root,
List<String> tags,
boolean recursion)
根据标签name搜索element
|
static List<org.dom4j.Element> |
elements(boolean shelf,
org.dom4j.Element root,
String tags)
根据标签name搜索element
|
static List<org.dom4j.Element> |
elements(boolean shelf,
org.dom4j.Element root,
String tags,
boolean recursion) |
static List<org.dom4j.Element> |
elements(boolean shelf,
List<org.dom4j.Element> roots,
String tags) |
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
List<String> tags) |
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
List<String> tags,
boolean recursion)
根据标签name搜索element
|
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
List<String> tags,
String attribute,
String value)
根据标签name以及属性值搜索element
|
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
String tags)
根据标签name搜索element
|
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
String tags,
boolean recursion) |
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
String attribute,
String value)
根据属性值搜索element
|
static List<org.dom4j.Element> |
elements(org.dom4j.Element root,
String tags,
String attribute,
String value) |
static List<org.dom4j.Element> |
elements(List<org.dom4j.Element> roots,
String tags) |
static String |
format(org.dom4j.Document document) |
static String |
format(org.dom4j.Node note) |
static String |
format(String xml) |
static void |
remove(org.dom4j.Element parent,
List<org.dom4j.Element> removes)
删除parent下的removes节点
|
public static org.dom4j.Element element(boolean shelf,
org.dom4j.Element root,
List<String> tags)
root - 根节点tags - 标签名(不含namespace)public static org.dom4j.Element element(boolean shelf,
org.dom4j.Element root,
String tags)
root - 根节点tags - 标签名(不含namespace)public static List<org.dom4j.Element> elements(boolean shelf, org.dom4j.Element root, List<String> tags, boolean recursion)
root - 根节点tags - 标签名(不含namespace)recursion - 递归查询子类public static List<org.dom4j.Element> elements(boolean shelf, org.dom4j.Element root, String tags, boolean recursion)
public static List<org.dom4j.Element> elements(boolean shelf, org.dom4j.Element root, List<String> tags)
public static List<org.dom4j.Element> elements(boolean shelf, org.dom4j.Element root, String tags)
root - 上级节点tags - name 多个以,分隔public static List<org.dom4j.Element> elements(boolean shelf, List<org.dom4j.Element> roots, String tags)
public static org.dom4j.Element element(org.dom4j.Element root,
List<String> tags)
root - 根节点tags - 标签名(不含namespace)public static org.dom4j.Element element(org.dom4j.Element root,
String tags)
root - 根节点tags - 标签名(不含namespace)public static List<org.dom4j.Element> elements(org.dom4j.Element root, List<String> tags, boolean recursion)
root - 根节点tags - 标签名(不含namespace)recursion - 递归查询子类public static List<org.dom4j.Element> elements(org.dom4j.Element root, String tags, boolean recursion)
public static List<org.dom4j.Element> elements(org.dom4j.Element root, String tags)
root - 上级节点tags - name 多个以,分隔public static org.dom4j.Element element(org.dom4j.Element root,
List<String> tags,
String attribute,
String value)
root - 根节点tags - 标签名(不含namespace)attribute - 属性名(不含namespace)value - 属性值public static org.dom4j.Element element(org.dom4j.Element root,
String tags,
String attribute,
String value)
public static List<org.dom4j.Element> elements(org.dom4j.Element root, List<String> tags, String attribute, String value)
root - 根节点tags - 标签名(不含namespace)attribute - 属性名(不含namespace)value - 属性值public static List<org.dom4j.Element> elements(org.dom4j.Element root, String tags, String attribute, String value)
public static org.dom4j.Element element(org.dom4j.Element root,
String attribute,
String value)
root - 根节点attribute - 属性名(不含namespace)value - 属性值public static List<org.dom4j.Element> elements(org.dom4j.Element root, String attribute, String value)
root - 根节点attribute - 属性名(不含namespace)value - 属性值public static boolean contains(org.dom4j.Element box,
org.dom4j.Element item)
public static String format(org.dom4j.Document document)
public static String format(org.dom4j.Node note)
public static List<org.dom4j.Element> afters(org.dom4j.Element element, String tag)
element - elementtag - 过滤标签public static List<org.dom4j.Element> befores(org.dom4j.Element element, String tag)
element - elementtag - 过滤标签public static List<org.dom4j.Element> betweens(org.dom4j.Element start, org.dom4j.Element end, String... tags)
start - 开始end - 结束tags - 过滤public static void remove(org.dom4j.Element parent,
List<org.dom4j.Element> removes)
parent - parentremoves - removesCopyright © 2025. All rights reserved.