类 Dom4jUtil

java.lang.Object
com.tlcsdm.core.util.Dom4jUtil

public class Dom4jUtil extends Object
Dom4j工具类. 使用xpath需要引用jaxen
作者:
unknowIfGuestInDream
  • 字段详细资料

  • 构造器详细资料

    • Dom4jUtil

      private Dom4jUtil()
  • 方法详细资料

    • read

      public static org.dom4j.Document read(URL url)
      通过url地址,获得document对象
    • read

      public static org.dom4j.Document read(String path)
      通过path,获得document对象
    • create

      public static org.dom4j.Document create()
      创建空的document
    • create

      public static org.dom4j.Document create(String contentXml)
      文本生成document
    • doc2XmlFile

      public static void doc2XmlFile(org.dom4j.Document document, String filename)
      document写入指定文件
    • transDocument2Text

      public static String transDocument2Text(org.dom4j.Document document, String path) throws Exception
      转换document对象为字符串
      抛出:
      Exception
    • formatXmlFile

      public int formatXmlFile(String filename)
      格式化,成功返回1
    • defaultOutputFormat

      public static org.dom4j.io.OutputFormat defaultOutputFormat()