Examples of XMLStreamWriter


Examples of javax.xml.stream.XMLStreamWriter

        System.out.println("Composite : " + c.getURI());
        for (Component component : c.getComponents()){
            System.out.println("  Component : " + component.getName());
        }
        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
        XMLStreamWriter writer = xof.createXMLStreamWriter(bos);
        xproc.write(c, writer, ctx);
        writer.close();
        System.out.println("Written XML = " + bos.toString());
        assertTrue(bos.toString().contains("class=\"sample.WelloTest\""));
    }
View Full Code Here

Examples of javolution.xml.stream.XMLStreamWriter

        try {
            // Formats the request message (we cannot write directly to
            // the output stream because the http request requires the length.
            _out.setOutput(_buffer);
            _writer.setOutput(_out);
            final XMLStreamWriter xmlOut = _writer.getStreamWriter();
            xmlOut.setPrefix(csq(ENVELOPE_PREFIX), csq(ENVELOPE_URI));
            xmlOut.writeStartElement(csq(ENVELOPE_URI), csq("Envelope"));
            xmlOut.writeNamespace(csq(ENVELOPE_PREFIX), csq(ENVELOPE_URI));
            xmlOut.writeStartElement(csq(ENVELOPE_URI), csq("Header"));
            xmlOut.writeEndElement();
            xmlOut.writeStartElement(csq(ENVELOPE_URI), csq("Body"));
            writeRequest(_writer);
            _writer.close();

            // Sends the request.
            if (_url == null)
View Full Code Here

Examples of mf.javax.xml.stream.XMLStreamWriter

        if (result == null) {
            fStAXValidatorHandler = null;
            fSchemaValidator.setDocumentHandler(null);
            return;
        }
        XMLStreamWriter writer = result.getXMLStreamWriter();
        if (writer != null) {
            if (fStAXStreamResultBuilder == null) {
                fStAXStreamResultBuilder = new StAXStreamResultBuilder(fNamespaceContext);
            }
            fStAXValidatorHandler = fStAXStreamResultBuilder;
View Full Code Here

Examples of net.java.textilej.util.XmlStreamWriter

   
    OutlineItem root = parser.parse(textileSource);
   
    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());
   
    emitToc(writer,root.getChildren());
   
    writer.writeEndElement(); // toc
   
    writer.writeEndDocument();
    writer.close();
   
    return out.toString();
   
  }
View Full Code Here

Examples of org.apache.maven.shared.utils.xml.XmlStreamWriter

     * @see XmlStreamWriter
     */
    public static XmlStreamWriter newXmlWriter( @Nonnull OutputStream out )
        throws IOException
    {
        return new XmlStreamWriter( out );
    }
View Full Code Here

Examples of org.codehaus.plexus.util.xml.XmlStreamWriter

     * @see XmlStreamWriter
     */
    public static XmlStreamWriter newXmlWriter( OutputStream out )
    throws IOException
    {
        return new XmlStreamWriter( out );
    }
View Full Code Here

Examples of org.grails.web.xml.XMLStreamWriter

        }
    }

    public void render(Writer out) throws ConverterException {
        stream = new StreamingMarkupWriter(out, encoding);
        writer = config.isPrettyPrint() ? new PrettyPrintXMLStreamWriter(stream): new XMLStreamWriter(stream);

        try {
            isRendering = true;
            writer.startDocument(encoding, "1.0");
            writer.startNode(getElementName(target));
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.