Package org.apache.tuscany.sca.common.xml.stax.impl

Examples of org.apache.tuscany.sca.common.xml.stax.impl.XMLStreamSerializer.serialize()


        XMLStreamSerializer serializer = new XMLStreamSerializer();
        StringWriter sw = new StringWriter();
        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
        outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
        XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
        serializer.serialize(reader, writer);
        String xml = sw.toString();
        XMLAssert.assertXMLEqual(XML_RESULT, xml);
    }

    private static class XmlNodeImpl implements XmlNode {
View Full Code Here


        return outputFactory.createXMLStreamWriter(result);
    }

    public void save(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException {
        XMLStreamSerializer serializer = new XMLStreamSerializer(isReparingNamespaces());
        serializer.serialize(reader, writer);
        writer.flush();
    }

    public void saveAsSAX(XMLStreamReader reader, ContentHandler contentHandler) throws XMLStreamException,
        SAXException {
View Full Code Here

        XMLStreamSerializer serializer = new XMLStreamSerializer();
        StringWriter sw = new StringWriter();
        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
        outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
        XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
        serializer.serialize(reader, writer);
        String xml = sw.toString();
        XMLAssert.assertXMLEqual(XML_RESULT, xml);
    }

    private static class XmlNodeImpl implements XmlNode {
View Full Code Here

        XMLStreamSerializer serializer = new XMLStreamSerializer();
        StringWriter sw = new StringWriter();
        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
        outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
        XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
        serializer.serialize(reader, writer);
        String xml = sw.toString();
        XMLAssert.assertXMLEqual(XML_RESULT, xml);
    }

    private static class XmlNodeImpl implements XmlNode {
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.