Examples of XMLSerializer


Examples of org.apache.xml.serialize.XMLSerializer

        try
        {
            // a serializer
            OutputFormat outputFormat = new OutputFormat( mXMLDocument, null, true );   //@XERCES
            outputFormat.setEncoding(mEncoding);                                        //@XERCES
            XMLSerializer ser = new XMLSerializer( tXMLWriter, outputFormat );          //@XERCES
            ser.serialize( mXMLDocument );                                              //@XERCES
            return tXMLWriter.toString();
        }
        catch( IOException e )
        {
            throw new ProgrammerException("XMLwithDOMBuilder: getXML returns exception: " + e.getMessage());

Examples of org.apache.xml.serialize.XMLSerializer

        try
        {
            // a serializer
            OutputFormat outputFormat = new OutputFormat( mXMLDocument, null, true );   //@XERCES
            outputFormat.setEncoding(mEncoding);                                        //@XERCES
            XMLSerializer ser = new XMLSerializer( tXMLWriter, outputFormat );          //@XERCES
            ser.serialize( mXMLDocument );                                              //@XERCES
        }
        catch( IOException e )
        {
            mLog.error("getXML returns IOException", e);
        }

Examples of org.apache.xml.serialize.XMLSerializer

  }
 
  public static void write(Document doc, Writer writer) throws IOException {
    OutputFormat format = new OutputFormat();
    format.setIndenting(INDENTING);
    XMLSerializer serializer = new XMLSerializer(format);
    serializer.setNamespaces(true);
    serializer.setOutputCharStream(writer);
    serializer.serialize(doc);
  }

Examples of org.apache.xml.serialize.XMLSerializer

  }

  public static void write(Element elem, Writer writer) throws IOException {
    OutputFormat format = new OutputFormat();
    format.setIndenting(INDENTING);
    XMLSerializer serializer = new XMLSerializer(format);
    serializer.setNamespaces(true);
    serializer.setOutputCharStream(writer);
    serializer.serialize(elem);
  }

Examples of org.apache.xml.serialize.XMLSerializer

      StringWriter out = new StringWriter();
      OutputFormat format = new OutputFormat(updatedJobDoc);
      format.setEncoding("ISO-8859-1");
      format.setIndenting(true);
      format.setIndent(2);
          XMLSerializer serializer = new XMLSerializer(out, format);
          serializer.serialize(updatedJobDoc);
          logger.debug3("submitting job... ");
          logger.debug9(out.toString());
          String answer = spooler.execute_xml(out.toString());
          logger.debug3("answer from scheduler: "+answer);

Examples of org.apache.xml.serialize.XMLSerializer

          OutputStreamWriter out = new OutputStreamWriter(fout, "UTF-8");
      OutputFormat format = new OutputFormat(updatedJobDoc);
      format.setEncoding("UTF-8");
      format.setIndenting(true);
      format.setIndent(2);
          XMLSerializer serializer = new XMLSerializer(out, format);
          logger.debug3("Writing file "+jobFile.getAbsolutePath());
          serializer.serialize(updatedJobDoc);
          out.close();
    } catch (Exception e){
      if (jobFile!=null){
        throw new Exception("Error occured updating job file \""+jobFile.getAbsolutePath()+"\": "+e,e);
      }else throw new Exception("Error occured updating file for job \""+jobName+"\": "+e,e);

Examples of org.apache.xml.serialize.XMLSerializer

          OutputStreamWriter out = new OutputStreamWriter(fout, "UTF-8");
      OutputFormat format = new OutputFormat(configurationDocument);
      format.setEncoding("UTF-8");
      format.setIndenting(true);
      format.setIndent(2);
          XMLSerializer serializer = new XMLSerializer(out, format);
          serializer.serialize(configurationDocument);
          out.close();
    } catch (Exception e){
      throw new Exception ("Error writing Job Scheduler configuration file: "+e,e);
    }
  } 

Examples of org.apache.xml.serialize.XMLSerializer

        StringWriter out = new StringWriter();
        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);
      }

Examples of org.apache.xml.serialize.XMLSerializer

        }
      }

      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) {

Examples of org.apache.xml.serialize.XMLSerializer

      OutputStreamWriter out = new OutputStreamWriter(fout, "UTF-8");
      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/>");
      }
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.