public static String getPathData(String filepath,String xmlpath)
{
org.dom4j.io.SAXReader sr = new org.dom4j.io.SAXReader();
try {
org.dom4j.Document doc = sr.read(new File(filepath));
doc.normalize();
org.dom4j.Node nd = doc.selectSingleNode(xmlpath); return nd.getText();
} catch (DocumentException e) {
e.printStackTrace();
}
return null;
}
{
org.dom4j.io.SAXReader sr = new org.dom4j.io.SAXReader();
try {
org.dom4j.Document doc = sr.read(new File(filepath));
doc.normalize();
org.dom4j.Node nd = doc.selectSingleNode(xmlpath); return nd.getText();
} catch (DocumentException e) {
e.printStackTrace();
}
return null;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货