获取URL

 

jdom获取文件值

private String getUrl() throws Exception, IOException {
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(this.getClass().getClassLoader()
.getResourceAsStream("com/xml/xmlformat/urlPath.xml"));
return doc.getRootElement().getValue();
}

你可能感兴趣的:(xml)