Package com.thaiopensource.relaxng.output.dtd

Examples of com.thaiopensource.relaxng.output.dtd.DtdOutputFormat


   * @param output DTD file (output)
   * @throws Exception
   */
  public static void generateDTDFromXML(File input,File output) throws Exception {
    ErrorHandlerImpl eh = new ErrorHandlerImpl();
    OutputFormat of = new DtdOutputFormat();
    InputFormat inFormat = new XmlInputFormat();
    SchemaCollection sc = inFormat.load(
        UriOrFile.toUri(input.getAbsolutePath()), new String[0], "dtd", eh);
   
    OutputDirectory od = new LocalOutputDirectory(
        sc.getMainUri(),output,"xml","utf-8",80,4);
   
    of.output(sc, od, new String[0], "xml", eh);
  }
View Full Code Here


   * @param output DTD file (output)
   * @throws Exception
   */
  public static void generateDTDFromXML(File input,File output) throws Exception {
    ErrorHandlerImpl eh = new ErrorHandlerImpl();
    OutputFormat of = new DtdOutputFormat();
    InputFormat inFormat = new XmlInputFormat();
    SchemaCollection sc = inFormat.load(
        UriOrFile.toUri(input.getAbsolutePath()), new String[0], "dtd", eh);
   
    OutputDirectory od = new LocalOutputDirectory(
        sc.getMainUri(),output,"xml","utf-8",80,4);
   
    of.output(sc, od, new String[0], "xml", eh);
  }
View Full Code Here

TOP

Related Classes of com.thaiopensource.relaxng.output.dtd.DtdOutputFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.