Java XML 的 Util

<textarea cols="50" rows="15" name="code" class="java">import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.io.SAXReader; public class DocumentUtil { public static Document loadXMLByAbsolutePath(String absoluteFilePath, String logFileName) { SAXReader saxReader = new SAXReader(); Document document = null; try { document = saxReader.read(new File(absoluteFilePath)); } catch(DocumentException ex) { ExceptionDefaultHandler.handle(ex, logFileName); } return document; } } </textarea>   

你可能感兴趣的:(Java XML 的 Util)