Package org.apache.xml.serialize

Examples of org.apache.xml.serialize.XMLSerializer.serialize()


        OutputFormat format = new OutputFormat(runTimeDocument);   
        format.setIndenting(true);
        format.setIndent(2);
        format.setOmitXMLDeclaration(true);
            XMLSerializer serializer = new XMLSerializer(out, format);
            serializer.serialize(runTimeDocument);
            Comment runTimeComment = jobDoc.createComment("This run_time is currently not supported:\n"+out.toString());
            jobElement.appendChild(runTimeComment);
      } else{
        jobElement.appendChild(runTimeElement);
      }
View Full Code Here


      }

      StringWriter out = new StringWriter();
      OutputFormat format = new OutputFormat(orderDoc);
      XMLSerializer serializer = new XMLSerializer(out, format);
      serializer.serialize(orderDoc);
      out.close();

      executeCommandOnOneOrAllSchedulers(host, port, out.toString());
    }
    catch (Exception e) {
View Full Code Here

      OutputFormat format = new OutputFormat(xml);
      format.setEncoding("UTF-8");
      format.setIndenting(true);
      format.setIndent(2);
      XMLSerializer serializer = new XMLSerializer(out, format);
      serializer.serialize(xml);
      out.close();
      if (!isWindows() && !startscript) {
        // notify Job Scheduler
        spooler.execute_xml("<check_folders/>");
      }
View Full Code Here

            }
            StringWriter out = new StringWriter();
            OutputFormat of = new OutputFormat(addOrderDocument);
            of.setEncoding("iso-8859-1");
            XMLSerializer serializer = new XMLSerializer(out, of);
            serializer.serialize(addOrderDocument);
            return out.toString();
    } catch (Exception e) {
      throw new Exception("Error creating add_order xml: "+e,e);
    }
  }
View Full Code Here

    requestXml.appendChild(envelope);

    StringWriter out = new StringWriter();
    XMLSerializer serializer = new XMLSerializer(out, new OutputFormat(
        requestXml));
    serializer.serialize(requestXml);
    String xmlRequest = out.toString();
    spooler_log_debug3(xmlRequest);
    return xmlRequest;
  }
View Full Code Here

      
         
         
        StringWriter out = new StringWriter();
        XMLSerializer serializer = new XMLSerializer(out, new OutputFormat(xmlDoc));
        serializer.serialize(xmlDoc);
        getLog().info("adding order [" + scheduler_order_id + "] to job chain [" + scheduler_order_job_chain + "]: ");
        getLog().debug3(out.toString());

        return  out.toString();
    }
View Full Code Here

      OutputFormat format = new OutputFormat(getEvents());
      format.setEncoding("UTF-8");
      format.setIndenting(true);
      format.setIndent(2);
      XMLSerializer serializer = new XMLSerializer(out, format);
      serializer.serialize(getEvents());
      out.close();
      getLogger().debug("current events logged to: " + eventFile.getAbsolutePath());
      getLogger().debug("transformation result logged to: " + resultLogFile.getAbsolutePath());
    }
    catch (Exception e) {
View Full Code Here

      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
      Document document = docBuilder.newDocument();
      document.appendChild(document.importNode(node, true));
      StringWriter out = new StringWriter();
      XMLSerializer serializer = new XMLSerializer(out, new OutputFormat(document));
      serializer.serialize(document);
      return out.toString();
    }
    catch (Exception e) {
      throw new Exception("error occurred transforming node: " + e.getMessage());
    }
View Full Code Here

   */
  public String xmlDocumentToString(Document document) throws Exception {
    try {
      StringWriter out = new StringWriter();
      XMLSerializer serializer = new XMLSerializer(out, new OutputFormat(document));
      serializer.serialize(document);
      return out.toString();
    }
    catch (Exception e) {
      throw new Exception("error occurred transforming document: " + e.getMessage());
    }
View Full Code Here

   */
  public String xmlElementToString(Element element) throws Exception {
    try {
      StringWriter out = new StringWriter();
      XMLSerializer serializer = new XMLSerializer(out, new OutputFormat());
      serializer.serialize(element);
      return out.toString();
    }
    catch (Exception e) {
      throw new Exception("error occurred transforming document: " + e.getMessage());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.