public class Dom4jXml extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Dom4jXml.Flag |
| 构造器和说明 |
|---|
Dom4jXml() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
attrValue(org.dom4j.Element e,
String attrName) |
org.dom4j.Document |
createEmptyXmlFile(String xmlPath) |
org.dom4j.Attribute |
getAttribute(org.dom4j.Element element,
String attrName) |
List<org.dom4j.Attribute> |
getAttributeList(org.dom4j.Element e) |
Iterator<org.dom4j.Attribute> |
getAttrIterator(org.dom4j.Element e) |
org.dom4j.Element |
getChild(org.dom4j.Element parent,
String childName) |
List<org.dom4j.Element> |
getChildElements(org.dom4j.Element parent,
String childName) |
List<org.dom4j.Element> |
getChildList(org.dom4j.Element node) |
org.dom4j.Document |
getDocument(String xmlPath)
根据xml文件路径取得document对象
|
Iterator<org.dom4j.Element> |
getIterator(org.dom4j.Element parent) |
List<org.dom4j.Element> |
getNameElement(org.dom4j.Element element,
String nodeName) |
<T> T |
getNameNode(String xmlFilePath,
String tagName,
Dom4jXml.Flag flag) |
<T> T |
getNameNodeAllAttributeMap(String xmlFilePath,
String nodeName,
Dom4jXml.Flag flag) |
Map<Integer,Object> |
getNameNodeAllKidsAttributeMap(org.dom4j.Element parent) |
Map<String,String> |
getNodeAttrMap(org.dom4j.Element e) |
org.dom4j.Element |
getRootNode(org.dom4j.Document document) |
org.dom4j.Element |
getRootNode(String xmlPath) |
org.dom4j.Node |
getSingleNode(org.dom4j.Element parent,
String nodeNodeName) |
Map<String,String> |
getSingleNodeText(org.dom4j.Element e) |
Map<String,String> |
getSingleNodeText(String xmlFilePath) |
boolean |
hasChild(org.dom4j.Element e) |
List<org.dom4j.Element> |
ransack(org.dom4j.Element element,
List<org.dom4j.Element> allkidsList) |
int |
validateSingle(org.dom4j.Element element) |
public org.dom4j.Document createEmptyXmlFile(String xmlPath)
xmlPath - public org.dom4j.Document getDocument(String xmlPath)
xmlPath - org.dom4j.DocumentExceptionpublic org.dom4j.Element getRootNode(org.dom4j.Document document)
#document - DOC对象public org.dom4j.Element getRootNode(String xmlPath)
xmlPath - org.dom4j.DocumentExceptionpublic Iterator<org.dom4j.Element> getIterator(org.dom4j.Element parent)
parent - public List<org.dom4j.Element> getChildElements(org.dom4j.Element parent, String childName)
parent - childName - public List<org.dom4j.Element> getChildList(org.dom4j.Element node)
node - public org.dom4j.Node getSingleNode(org.dom4j.Element parent,
String nodeNodeName)
parent - nodeNodeName - public org.dom4j.Element getChild(org.dom4j.Element parent,
String childName)
parent - childName - public boolean hasChild(org.dom4j.Element e)
e - public Iterator<org.dom4j.Attribute> getAttrIterator(org.dom4j.Element e)
e - public List<org.dom4j.Attribute> getAttributeList(org.dom4j.Element e)
e - public org.dom4j.Attribute getAttribute(org.dom4j.Element element,
String attrName)
element - 指定的元素attrName - 属性名称public Map<String,String> getSingleNodeText(org.dom4j.Element e)
e - public Map<String,String> getSingleNodeText(String xmlFilePath)
xmlFilePath - public <T> T getNameNode(String xmlFilePath, String tagName, Dom4jXml.Flag flag)
xmlFilePath - tagName - flag - : 指定元素的个数public Map<Integer,Object> getNameNodeAllKidsAttributeMap(org.dom4j.Element parent)
parent - public <T> T getNameNodeAllAttributeMap(String xmlFilePath, String nodeName, Dom4jXml.Flag flag)
xmlFilePath - nodeName - public List<org.dom4j.Element> ransack(org.dom4j.Element element, List<org.dom4j.Element> allkidsList)
element - public List<org.dom4j.Element> getNameElement(org.dom4j.Element element, String nodeName)
element - nodeName - public int validateSingle(org.dom4j.Element element)
element - Copyright © 2017. All rights reserved.