Examples of XMLSerializer


Examples of com.adobe.dp.xml.util.XMLSerializer

    subsetter.setStyles(styleResources);
    body.addFonts(subsetter);
  }

  public void serialize(OutputStream out) throws IOException {
    XMLSerializer ser = new XMLSerializer(out);
    serialize(ser);
  }

Examples of com.gargoylesoftware.htmlunit.javascript.host.xml.XMLSerializer

     */
    public Object jsxGet_xml() {
        final DomNode node = getDomNodeOrDie();
        if (node.getPage() instanceof XmlPage) {
            if (this instanceof Element) {
                final XMLSerializer serializer = new XMLSerializer();
                serializer.setParentScope(getParentScope());
                String xml = serializer.jsxFunction_serializeToString(this);
                if (getBrowserVersion().isIE() && xml.endsWith("\r\n")) {
                    xml = xml.substring(0, xml.length() - 2);
                }
                return xml;
            }

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

            // Serialize the schema element.
            //
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            OutputFormat of = new OutputFormat(doc);
            XMLSerializer ser = new XMLSerializer(os, of);
            ser.serialize(schemaEl);
            os.flush();
            os.close();
            result.put(tns, os.toByteArray());
        }
        return result;

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

            // Element xElem = xDoc.createElement("test");
            // xElem.appendChild(xDoc.importNode(xNode, true));
            xDoc.appendChild(xDoc.importNode(xNode, true));
           
            StringWriter out = new StringWriter();
            XMLSerializer serializer = new XMLSerializer(out, new OutputFormat(xDoc));
            serializer.serialize(xDoc);
            String result = out.toString();
           
           
        SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer("<spooler><answer><ERROR code=\"4711\" text=\"ein Fehler\"/></answer></spooler>"));
      String astring = xpath.selectSingleNodeValue("//ERROR/@code");

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

        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();
    }

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

  public Object marshal(Object objO, File objF) {
    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::marshal";
    try {
      // get an Apache XMLSerializer configured to generate CDATA
      XMLSerializer serializer = getXMLSerializer();
      FileOutputStream objFOS = new FileOutputStream(objF);
      serializer.setOutputByteStream(objFOS);
      // marshal using the Apache XMLSerializer
      objM.marshal(objO, serializer.asContentHandler());
      // objM.marshal(objO, objF);
    }
    catch (JAXBException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

    final String conMethodName = conClassName + "::marshal";
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream( baos );
    try {
      // get an Apache XMLSerializer configured to generate CDATA
          XMLSerializer serializer = getXMLSerializer();

//          FileOutputStream objFOS = new FileOutputStream(objFos);
      serializer.setOutputByteStream(out);
      // marshal using the Apache XMLSerializer
          objM.marshal(objO, serializer.asContentHandler());
//      objM.marshal(objO, objF);
    }
    catch (JAXBException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

        if (objOutputStream == null) {
          logger.error(String.format("can't get outputstream for file '%1$s'.", pobjVirtualFile.getName()));
          throw new JobSchedulerException(String.format("can't get outputstream for file '%1$s'.", pobjVirtualFile.getName()));
        }
        // get an Apache XMLSerializer configured to generate CDATA
        XMLSerializer serializer = getXMLSerializer();
        serializer.setOutputByteStream(objOutputStream);
        // marshal using the Apache XMLSerializer
        objM.marshal(objO, serializer.asContentHandler());
      }
      catch (JAXBException e) {
        e.printStackTrace();
        throw new JobSchedulerException("", e);
      }

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::toXMLString";
    String strT = "";
    try {
      // get an Apache XMLSerializer configured to generate CDATA
      XMLSerializer serializer = getXMLSerializer();
      OutputFormat objOutputFormat = new OutputFormat();
      // TODO in die Optionclass
      objOutputFormat.setEncoding("iso-8859-1");
      serializer.setOutputFormat(objOutputFormat);
      StringWriter objSW = new StringWriter();
      serializer.setOutputCharStream(objSW);
      // marshal using the Apache XMLSerializer
      objM.marshal(objO, serializer.asContentHandler());
      // objM.marshal(objO, objSW);
      strT = objSW.getBuffer().toString();
    }
    catch (JAXBException e) {
      e.printStackTrace();

Examples of com.sun.org.apache.xml.internal.serialize.XMLSerializer

  private XMLSerializer getXMLSerializer() {
    OutputFormat of = new OutputFormat();
    of.setCDataElements(new String[] { "^description", "^script", "^scheduler_script", "^log_mail_to", "^log_mail_cc", "^log_mail_bcc" });
    // TODO setIndenting should be an option
    of.setIndenting(true);
    XMLSerializer serializer = new XMLSerializer(of);
    return serializer;
  } // private XMLSerializer getXMLSerializer
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.