Package org.apache.tuscany.sca.databinding.xml

Examples of org.apache.tuscany.sca.databinding.xml.XMLStreamReader2String


        transformers.addTransformer(new String2XMLStreamReader());
        transformers.addTransformer(new Writer2ReaderDataPipe());

        transformers.addTransformer(new XMLStreamReader2Node());
        transformers.addTransformer(new XMLStreamReader2SAX());
        transformers.addTransformer(new XMLStreamReader2String());
    }
View Full Code Here


        ExtensionPointRegistry extensionPointRegistry = new DefaultExtensionPointRegistry();

        StAXHelper helper = StAXHelper.getInstance(extensionPointRegistry);
        XMLStreamReader r1 = helper.createXMLStreamReader(new StringReader(xml));
        XMLDocumentStreamReader r2 = new XMLDocumentStreamReader(r1);
        XMLStreamReader2String t1 = new XMLStreamReader2String(extensionPointRegistry);
        String result = t1.transform(r2, null);
        System.out.println(result);
        XMLStreamReader r3 = helper.createXMLStreamReader(new StringReader(xml));
        r3.nextTag();
        r3.nextTag();
        Assert.assertEquals(XMLStreamConstants.START_ELEMENT, r3.getEventType());
        Assert.assertEquals(new QName(null, "e2"), r3.getName());
        XMLDocumentStreamReader r4 = new XMLDocumentStreamReader(r3);
        result = t1.transform(r4, null);
        System.out.println(result);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.databinding.xml.XMLStreamReader2String

Copyright © 2018 www.massapicom. 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.