public class XmlAccessor extends Object
| 构造器和说明 |
|---|
XmlAccessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Element |
getElement(Document doc,
XPathFactory factory,
String elementXpath) |
String |
getElementAttribute(Document doc,
XPathFactory factory,
String elementXpath,
String attributeName) |
String |
getElementAttribute(String xmlFilePath,
String elementXpath,
String attributeName) |
NodeList |
getNodeList(Document doc,
XPathFactory factory,
String elementXpath) |
void |
setElementAttribute(Document doc,
XPathFactory factory,
String elementXpath,
String attributeName,
String attributeValue) |
void |
setElementAttributes(Document doc,
XPathFactory factory,
String elementXpath,
Map<String,String> attrs) |
void |
setElementsAttributes(Document doc,
XPathFactory factory,
String elementXpath,
Map<String,String> attrs) |
public void setElementAttribute(Document doc, XPathFactory factory, String elementXpath, String attributeName, String attributeValue) throws Exception
Exceptionprotected Element getElement(Document doc, XPathFactory factory, String elementXpath) throws XPathExpressionException
public void setElementAttributes(Document doc, XPathFactory factory, String elementXpath, Map<String,String> attrs) throws Exception
Exceptionpublic void setElementsAttributes(Document doc, XPathFactory factory, String elementXpath, Map<String,String> attrs) throws Exception
Exceptionpublic String getElementAttribute(String xmlFilePath, String elementXpath, String attributeName) throws Exception
Exceptionpublic String getElementAttribute(Document doc, XPathFactory factory, String elementXpath, String attributeName) throws Exception
Exceptionpublic NodeList getNodeList(Document doc, XPathFactory factory, String elementXpath) throws XPathExpressionException
Copyright © 2019. All rights reserved.