public class XmlUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
private DocumentBuilderFactory |
factory |
static org.slf4j.Logger |
LOG |
private Document |
xmlDoc |
| Modifier | Constructor and Description |
|---|---|
private |
XmlUtil()
构造方法.
|
private |
XmlUtil(File xmlFile)
构造方法.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributeValue(Node node,
String attribute) |
List<Node> |
getChildByName(Node parent,
String name) |
Node |
getFirstChildByName(Node parent,
String name) |
static XmlUtil |
getInstance() |
static XmlUtil |
getInstance(File xmlFile) |
Node |
getRoot() |
public static final org.slf4j.Logger LOG
private DocumentBuilderFactory factory
private Document xmlDoc
private XmlUtil()
xmlFileName - classpath根路径下的xml文件名private XmlUtil(File xmlFile)
xmlFile - 指定的xml文件Copyright © 2015. All rights reserved.