Package jimm.util

Examples of jimm.util.XMLWriter


* Writes the contents of this report as an XML file.
*
* @param fileName a file name string
*/
public void writeFile(String fileName) {
    XMLWriter out = null;
    try {
  out = new XMLWriter(new OutputStreamWriter(new FileOutputStream(fileName),
                  XML_JAVA_ENCODING));
  writeXML(out);
  out.close();
    }
    catch (IOException ioe) {
  ErrorHandler.error(I18N.get("Report.write_err") + ' ' + fileName, ioe,
         I18N.get("Report.write_err_title"));
    }
    finally {
  if (out != null) out.close();
    }
}
View Full Code Here


    out.endElement();
}

public String toString() {
    StringWriter sw = new StringWriter();
    writeXML(new XMLWriter(sw));
    return sw.toString();
}
View Full Code Here

  else {
      outFileName = fileNameSansExtension + ".xml";
      if (outFileName.equals(fileName))
    outFileName = fileNameSansExtension + "_out.xml";
  }
  XMLWriter iout = new XMLWriter(new FileWriter(outFileName));
  le = new XMLLE(iout);
  break;
    case 'E':
  if (layoutEngineFileName != null)
    outFileName = layoutEngineFileName;
View Full Code Here

    // Don't forget this.
    commandHistory.setBaseline();
}

protected void sendData(URLConnection conn) throws IOException {
    XMLWriter out = null;
    try {
  out = new XMLWriter(conn.getOutputStream());
  report.writeXML(out);
  out.flush();
    }
    catch (IOException e) {
  throw e;
    }
    finally {
  if (out != null) out.close();
    }
}
View Full Code Here

  else if (I18N.get("ExportWin.le_latex").equals(choice))
      le = new LaTeXLE(new PrintWriter(new FileWriter(path)));
  else if (I18N.get("ExportWin.le_pdf").equals(choice))
      le = new PDFLE(new FileOutputStream(path));
  else if (I18N.get("ExportWin.le_xml").equals(choice))
      le = new XMLLE(new XMLWriter(new FileOutputStream(path)));
  else if (I18N.get("ExportWin.le_xls").equals(choice))
      le = new ExcelLE(new FileOutputStream(path),false);
  else if (I18N.get("ExportWin.le_csshtml").equals(choice))
      le = new CSSHTMLLE(new PrintWriter(new FileWriter(path)));
View Full Code Here

    super(name);
}

public void setUp() {
    s = new StringWriter();
    out = new XMLWriter(s, false, 1); // Indent level == 1
    linesep = System.getProperty("line.separator").toString();
}
View Full Code Here

TOP

Related Classes of jimm.util.XMLWriter

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.