Examples of writeStartDocument()


Examples of javax.xml.stream.XMLStreamWriter.writeStartDocument()

         throw new IOException("Could not create XML streaming writer.", e);
      }

      try
      {
         writer.writeStartDocument("UTF-8", "1.0");
         // root element <failureResult>
         nl(writer, pretty);
         writer.writeStartElement("failureResult");
         nl(writer, pretty);
         indent(writer, 1, pretty);
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeStartDocument()

      NVPair contentTypePair = new NVPair("Content-Type", "text/xml");
      HTTPResponse response = setupRequest("PROPFIND", resource, new NVPair[]{depthPair, contentTypePair}, null, out);
      try
      {
         XMLStreamWriter sw = factory.createXMLStreamWriter(out, "UTF-8");
         sw.writeStartDocument("UTF-8", "1.0");
         sw.writeStartElement("D", "propfind", "DAV:");
         sw.writeNamespace("D", "DAV:");
         sw.writeStartElement("D", "prop", "DAV:");
         for (String prop : props)
            sw.writeEmptyElement("D", prop, "DAV:");
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeStartDocument()

      HTTPResponse response = setupRequest("PROPPATCH", resource, new NVPair[]{contentTypePair}, null, out);

      try
      {
         XMLStreamWriter sw = factory.createXMLStreamWriter(out, "UTF-8");
         sw.writeStartDocument("UTF-8", "1.0");
         sw.writeStartElement("D", "propertyupdate", "DAV:");
         sw.writeNamespace("D", "DAV:");
         if (propsSet != null && propsSet.size() > 0)
         {
            sw.writeStartElement("D", "set", "DAV:");
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeStartDocument()

         setupRequest("LOCK", resource, new NVPair[]{contentTypePair, timeoutPair, depthPair}, null, out);
      try
      {
         XMLOutputFactory factory = XMLOutputFactory.newInstance();
         XMLStreamWriter sw = factory.createXMLStreamWriter(out, "UTF-8");
         sw.writeStartDocument("UTF-8", "1.0");
         sw.writeStartElement("D", "lockinfo", "DAV:");
         sw.writeNamespace("D", "DAV:");
         sw.writeStartElement("D", "lockscope", "DAV:");
         if (isExclusive)
            sw.writeEmptyElement("D", "exclusive", "DAV:");
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeStartDocument()

            try
            {
               XMLOutputFactory factory = XMLOutputFactory.newInstance();
               XMLStreamWriter writer = factory.createXMLStreamWriter(po, Constants.DEFAULT_ENCODING);

               writer.writeStartDocument(Constants.DEFAULT_ENCODING, "1.0");
               writer.writeStartElement(XML_NODE);
               writer.writeAttribute(PREFIX_XMLNS, PREFIX_LINK);
               writer.writeAttribute(XLINK_XMLNS, XLINK_LINK);
               writer.writeAttribute(XML_NAME, node.getName());
               writer.writeAttribute(XML_HREF, rootHref + TextUtil.escape(node.getPath(), '%', true));
View Full Code Here

Examples of javolution.xml.stream.XMLStreamWriter.writeStartDocument()

            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            FileOutputStream stream = new FileOutputStream(configFilename);
            XMLStreamWriter writer;
            writer = outputFactory.createXMLStreamWriter(stream,"UTF-8");

            writer.writeStartDocument("utf-8", "1.0");      // Header
            writer.writeStartElement("openkm");             // openkm node

            writer.writeStartElement("host");               // host
            writer.writeCharacters(configBean.getHost());
            writer.writeEndElement();
View Full Code Here

Examples of net.java.textilej.util.XmlStreamWriter.writeStartDocument()

   
    StringWriter out = new StringWriter(8096);
   
    XmlStreamWriter writer = createXmlStreamWriter(out);
   
    writer.writeStartDocument("utf-8","1.0");
   
    writer.writeStartElement("toc");
    writer.writeAttribute("topic", getHtmlFile());
    writer.writeAttribute("label", getBookTitle());
   
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument()

        OMOutputFormat format = new OMOutputFormat();
        format.setDoOptimize(true);
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(baos, format);
       
        // Marshal the value
        writer.writeStartDocument();
        writer.writeStartElement("root");
        context.marshal(jaxbElement, writer);
        writer.writeEndElement();
        writer.writeEndDocument();
        writer.flush();
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.json.utils.PrefixCollectingXMLStreamWriter.writeStartDocument()

        AegisWriter<XMLStreamWriter> aegisWriter = context.createXMLStreamWriter();
        try {
            W3CDOMStreamWriter w3cStreamWriter = new W3CDOMStreamWriter();
            XMLStreamWriter spyingWriter = new PrefixCollectingXMLStreamWriter(w3cStreamWriter,
                                                                               namespaceMap);
            spyingWriter.writeStartDocument();
            // use type qname as element qname?
            aegisWriter.write(obj, aegisType.getSchemaType(), false, spyingWriter, aegisType);
            spyingWriter.writeEndDocument();
            spyingWriter.close();
            Document dom = w3cStreamWriter.getDocument();
View Full Code Here

Examples of org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.writeStartDocument()

            }
        };

        xmlSecurityStreamWriter.setNamespaceContext(namespaceContext);
        stdXmlStreamWriter.setNamespaceContext(namespaceContext);
        xmlSecurityStreamWriter.writeStartDocument("UTF-8", "1.0");
        stdXmlStreamWriter.writeStartDocument("UTF-8", "1.0");

        xmlSecurityStreamWriter.writeDTD("<!DOCTYPE foobar [\n\t<!ENTITY x0 \"hello\">\n]>");
        stdXmlStreamWriter.writeDTD("<!DOCTYPE foobar [\n\t<!ENTITY x0 \"hello\">\n]>");
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.