dom4j的问题
public Document getDocument(URL url) throws Exception { Document document = null; SAXReader saxReader = new SAXReader(); document = saxReader.read(url); return document; }
public static void main(String[] args) throws Exception { TestDom4j td = new TestDom4j(); URL url = td.getClass().getProtectionDomain().getCodeSource().getLocation(); System.out.println(url); Document doc = td.getDocument(url); }