Search in sources :

Example 1 with StaxBuilder

use of org.apache.cxf.aegis.util.jdom.StaxBuilder in project cxf by apache.

the class WriterTest method testLiteral.

@Test
public void testLiteral() throws Exception {
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    ElementWriter writer = new ElementWriter(bos, "root", "urn:test");
    write(writer);
    writer.flush();
    bos.close();
    // System.out.println(bos.toString());
    StaxBuilder builder = new StaxBuilder();
    Document doc = builder.build(new StringReader(bos.toString()));
    testWrite(doc);
}
Also used : StaxBuilder(org.apache.cxf.aegis.util.jdom.StaxBuilder) StringReader(java.io.StringReader) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Document(org.jdom.Document) AbstractCXFTest(org.apache.cxf.test.AbstractCXFTest) Test(org.junit.Test)

Aggregations

ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 StringReader (java.io.StringReader)1 StaxBuilder (org.apache.cxf.aegis.util.jdom.StaxBuilder)1 AbstractCXFTest (org.apache.cxf.test.AbstractCXFTest)1 Document (org.jdom.Document)1 Test (org.junit.Test)1