dom4j /**
* 定位xml,获得该xml文档的Document
*
* @param xPath
* 相对路径
* @return 成功返回doc
* @throws Exception
*/
public static Document openXml(String xPath) {
Document doc = null;
try {
SAXReader saxReader = new SAXReader();
doc = saxReader.read(xPath);
} catch (Exception ex) {
ComStatic.FetchInfoLog.errLog("Read XML Error-->>" + ex.toString());
}
return doc;
}
* 定位xml,获得该xml文档的Document
*
* @param xPath
* 相对路径
* @return 成功返回doc
* @throws Exception
*/
public static Document openXml(String xPath) {
Document doc = null;
try {
SAXReader saxReader = new SAXReader();
doc = saxReader.read(xPath);
} catch (Exception ex) {
ComStatic.FetchInfoLog.errLog("Read XML Error-->>" + ex.toString());
}
return doc;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货