获取xml中根节点的方法
public String getNode() throws Exception,IOException {
SAXBuilder builder=new SAXBuilder();
Document doc=builder.build(this.getClass().getClassLoader().getResourceAsStream(路径));
return doc.getRootElement().getValue();
}
获取xml中根节点的方法
public String getNode() throws Exception,IOException {
SAXBuilder builder=new SAXBuilder();
Document doc=builder.build(this.getClass().getClassLoader().getResourceAsStream(路径));
return doc.getRootElement().getValue();
}