Package org.apache.lenya.xml

Examples of org.apache.lenya.xml.DOMWriter


    try {
      RCML rcml = new RCML(args[0], args[1], args[2]);
      rcml.checkOutIn(RCML.co, "michi", new Date().getTime(), false);

      new DOMWriter(new PrintWriter(System.out)).print(this.document);

      CheckOutEntry coe = rcml.getLatestCheckOutEntry();
      System.out.println("\n");

      if (coe == null) {
View Full Code Here


                // Create a new document, where the actual content starts at the root element, which is the inner part of requestDoc
                Document contentDocument = dpf.getDocument();
                contentDocument.appendChild(
                    dpf.cloneNode(contentDocument, contentNode, true));
                new DOMWriter(new FileOutputStream(tempFile)).printWithoutFormatting(
                    contentDocument);
            } catch (Exception e) {
                getLogger().error(".act(): Exception during writing to temp file", e);
            }
        }
View Full Code Here

            doc = parser.getDocument(args[0]);
        } catch (Exception e) {
            System.err.println(e);
        }

        new DOMWriter(new PrintWriter(System.out)).print(doc);
        System.out.println("");

        Document document = parser.getDocument();
        Element michi = parser.newElementNode(document, "Employee");
        michi.setAttribute("Id", "michi");
        michi.appendChild(parser.newTextNode(document, "Michi"));

        Element employees = parser.newElementNode(document, "Employees");
        employees.appendChild(parser.newTextNode(document, "\n"));
        employees.appendChild(michi);
        employees.appendChild(parser.newTextNode(document, "\n"));
        document.appendChild(employees);
        new DOMWriter(new PrintWriter(System.out)).print(document);
        System.out.println("");
    }
View Full Code Here

    try {
      RCML rcml = new RCML(args[0], args[1], args[2]);
      rcml.checkOutIn(RCML.co, "michi", new Date().getTime());

      new DOMWriter(new PrintWriter(System.out)).print(this.document);

      CheckOutEntry coe = rcml.getLatestCheckOutEntry();
      System.out.println("\n");

      if (coe == null) {
View Full Code Here

     * @throws IOException if an error occurs
     * @throws Exception if an error occurs
     */
    public void write() throws IOException, Exception {
        XPSFileOutputStream xpsfos = new XPSFileOutputStream(rcmlFile.getAbsolutePath());
        new DOMWriter(xpsfos).print(this.document);
        xpsfos.close();

        clearDirty();
    }
View Full Code Here

    try {
      RCML rcml = new RCML(args[0], args[1], args[2]);
      rcml.checkOutIn(RCML.co, "michi", new Date().getTime(), false);

      new DOMWriter(new PrintWriter(System.out)).print(this.document);

      CheckOutEntry coe = rcml.getLatestCheckOutEntry();
      System.out.println("\n");

      if (coe == null) {
View Full Code Here

                // Create a new document, where the actual content starts at the root element, which is the inner part of requestDoc
                Document contentDocument = dpf.getDocument();
                contentDocument.appendChild(
                    (Element) dpf.cloneNode(contentDocument, contentNode, true));
                new DOMWriter(new FileOutputStream(tempFile)).printWithoutFormatting(
                    contentDocument);
            } catch (Exception e) {
                getLogger().error(".act(): Exception during writing to temp file", e);
            }
        }
View Full Code Here

    try {
      RCML rcml = new RCML(args[0], args[1], args[2]);
      rcml.checkOutIn(RCML.co, "michi", new Date().getTime(), false);

      new DOMWriter(new PrintWriter(System.out)).print(this.document);

      CheckOutEntry coe = rcml.getLatestCheckOutEntry();
      System.out.println("\n");

      if (coe == null) {
View Full Code Here

     * @throws IOException if an error occurs
     * @throws Exception if an error occurs
     */
    public void write() throws IOException, Exception {
        XPSFileOutputStream xpsfos = new XPSFileOutputStream(rcmlFile.getAbsolutePath());
        new DOMWriter(xpsfos).print(this.document);
        xpsfos.close();

        clearDirty();
    }
View Full Code Here

            doc = parser.getDocument(args[0]);
        } catch (Exception e) {
            System.err.println(e);
        }

        new DOMWriter(new PrintWriter(System.out)).print(doc);
        System.out.println("");

        Document document = parser.getDocument();
        Element michi = parser.newElementNode(document, "Employee");
        michi.setAttribute("Id", "michi");
        michi.appendChild(parser.newTextNode(document, "Michi"));

        Element employees = parser.newElementNode(document, "Employees");
        employees.appendChild(parser.newTextNode(document, "\n"));
        employees.appendChild(michi);
        employees.appendChild(parser.newTextNode(document, "\n"));
        document.appendChild(employees);
        new DOMWriter(new PrintWriter(System.out)).print(document);
        System.out.println("");
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.xml.DOMWriter

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.