Examples of writeStartDocument()


Examples of org.codehaus.jettison.AbstractXMLStreamWriter.writeStartDocument()

    public void testPrimitiveInfinityNaN() throws Exception {
        StringWriter strWriter = new StringWriter();
        MappedNamespaceConvention con = new MappedNamespaceConvention();
        AbstractXMLStreamWriter w = new MappedXMLStreamWriter(con, strWriter);

        w.writeStartDocument();
        w.writeStartElement("root");


        w.writeStartElement("subchild1");
        w.writeCharacters("Infinity");
View Full Code Here

Examples of org.codehaus.jettison.badgerfish.BadgerFishXMLStreamWriter.writeStartDocument()

public class BadgerFishXMLStreamWriterTest extends TestCase {
    public void testRootWithText() throws Exception {
        StringWriter strWriter = new StringWriter();
        AbstractXMLStreamWriter w = new BadgerFishXMLStreamWriter(strWriter);
       
        w.writeStartDocument();
        w.writeStartElement("alice");
        w.writeCharacters("bob");
        w.writeEndElement();
        w.writeEndDocument();
       
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.writeStartDocument()

        //XMLValidationSchemaFactory vd = XMLValidationSchemaFactory.newInstance(XMLValidationSchema.SCHEMA_ID_DTD);
        //XMLValidationSchema schema = vd.createSchema(new StringReader(dtdStr));
        //sw.validateAgainst(schema);

        sw.writeStartDocument();
        sw.writeComment("Comment!");
        sw.writeCharacters("\r");
        sw.writeStartElement("root");
        sw.writeAttribute("attr", "value");
        sw.writeAttribute("another", "this & that");
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamWriter2.writeStartDocument()

    private void writeFileContentsAsXML(OutputStream out)
        throws IOException, XMLStreamException
    {
        XMLStreamWriter2 sw = (XMLStreamWriter2) _xmlOutputFactory.createXMLStreamWriter(out);
        sw.writeStartDocument();
        sw.writeStartElement("files");
        byte[] buffer = new byte[4000];
        MessageDigest md;
        try {
            md = MessageDigest.getInstance(DIGEST_TYPE);
View Full Code Here

Examples of org.codehaus.stax2.typed.TypedXMLStreamWriter.writeStartDocument()

        Document doc = createDomDoc(false);
        // let's use namespace-aware just because some impls might not support non-ns
        XMLOutputFactory of = getFactory(TYPE_NS);
        TypedXMLStreamWriter sw = (TypedXMLStreamWriter) of.createXMLStreamWriter(new DOMResult(doc));

        sw.writeStartDocument();
        sw.writeStartElement("root");
        sw.writeIntAttribute(null, null, "attr", -900);
        sw.writeInt(123);
        sw.writeEndElement();
        sw.writeEndDocument();
View Full Code Here

Examples of org.jvnet.staxex.XMLStreamWriterEx.writeStartDocument()

    }
   
    MutableXMLStreamBuffer createBuffer() throws Exception {
        MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
        XMLStreamWriterEx writer = (XMLStreamWriterEx)buffer.createFromXMLStreamWriter();
        writer.writeStartDocument();
        writer.writeStartElement("foo");
        writer.writeBinary(bytes, 0, bytes.length, null);
        writer.writeEndElement();
        writer.writeEndDocument();
       
View Full Code Here

Examples of org.metatype.sxc.util.XoXMLStreamWriter.writeStartDocument()

            writer = xof.createXMLStreamWriter(streamResult.getOutputStream(), "UTF-8");
            writer = new PrettyPrintXMLStreamWriter(writer);
            final XoXMLStreamWriter w = new XoXMLStreamWriterImpl(writer);

            try {
                w.writeStartDocument("UTF-8", null);

                // write xsi:type if there is no default root element for this type

                final RuntimeContext context = new RuntimeContext((ExtendedMarshaller) null);
View Full Code Here

Examples of org.metatype.sxc.util.XoXMLStreamWriterImpl.writeStartDocument()

            writer = xof.createXMLStreamWriter(streamResult.getOutputStream(), "UTF-8");
            writer = new PrettyPrintXMLStreamWriter(writer);
            final XoXMLStreamWriter w = new XoXMLStreamWriterImpl(writer);

            try {
                w.writeStartDocument("UTF-8", null);

                // write xsi:type if there is no default root element for this type

                final RuntimeContext context = new RuntimeContext((ExtendedMarshaller) null);
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.