Package org.codehaus.jettison.badgerfish

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


        xsw.writeStartElement("Rating");
        xsw.writeAttribute("id", "200");
        xsw.writeAttribute("value", "4");
        xsw.writeEndElement();

        xsw.writeStartElement("Rating");
        xsw.writeAttribute("id", "300");
        xsw.writeAttribute("value", "5");
        xsw.writeEndElement();

        xsw.writeEndElement();
View Full Code Here


    public void testAttributeAndText() throws Exception {
        StringWriter strWriter = new StringWriter();
        AbstractXMLStreamWriter w = new BadgerFishXMLStreamWriter(strWriter);
       
        w.writeStartDocument();
        w.writeStartElement("alice");
       
        w.writeAttribute("charlie", "david");
        w.writeCharacters("bob");
       
        w.writeEndElement();
View Full Code Here

    public void testDefaultNamespace() throws Exception {
        StringWriter strWriter = new StringWriter();
        BadgerFishXMLStreamWriter w = new BadgerFishXMLStreamWriter(strWriter);
       
        w.writeStartDocument();
        w.writeStartElement("alice");
       
        w.writeDefaultNamespace("http://some-namespace");
        w.writeCharacters("bob");
       
        w.writeEndElement();
View Full Code Here

    public void testPrefixedNamespace() throws Exception {
        StringWriter strWriter = new StringWriter();
        BadgerFishXMLStreamWriter w = new BadgerFishXMLStreamWriter(strWriter);
       
        w.writeStartDocument();
        w.writeStartElement("alice");
       
        w.writeDefaultNamespace("http://some-namespace");
        w.writeNamespace("charlie", "http://some-other-namespace");
       
        assertEquals("http://some-other-namespace", w.getNamespaceContext().getNamespaceURI("charlie"));
View Full Code Here

    public void testPrefixedElements() throws Exception {
        StringWriter strWriter = new StringWriter();
        BadgerFishXMLStreamWriter w = new BadgerFishXMLStreamWriter(strWriter);
       
        w.writeStartDocument();
        w.writeStartElement("alice");
       
        w.writeDefaultNamespace("http://some-namespace");
        w.writeNamespace("charlie", "http://some-other-namespace");
       
        w.writeStartElement("bob");
View Full Code Here

        w.writeStartElement("alice");
       
        w.writeDefaultNamespace("http://some-namespace");
        w.writeNamespace("charlie", "http://some-other-namespace");
       
        w.writeStartElement("bob");
        w.writeCharacters("david");
        w.writeEndElement();
       

        w.writeStartElement("charlie", "edgar", "http://some-other-namespace");
View Full Code Here

        w.writeStartElement("bob");
        w.writeCharacters("david");
        w.writeEndElement();
       

        w.writeStartElement("charlie", "edgar", "http://some-other-namespace");
        w.writeCharacters("frank");
        w.writeEndElement();
       
        w.writeEndElement();
        w.writeEndDocument();
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.