Package org.apache.cocoon.stax.sample.src

Examples of org.apache.cocoon.stax.sample.src.SubSetTransformer


        ByteArrayOutputStream out = new ByteArrayOutputStream();

        Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
        pipe.addComponent(new XMLGenerator(input));
        XMLEventFactory factory = XMLEventFactory.newInstance();
        pipe.addComponent(new SubSetTransformer("element", factory.createAttribute(new QName("attribute"), "first")));
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

        String created = out.toString();
View Full Code Here


        ByteArrayOutputStream out = new ByteArrayOutputStream();

        Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
        pipe.addComponent(new XMLGenerator(input));
        XMLEventFactory factory = XMLEventFactory.newInstance();
        pipe.addComponent(new SubSetTransformer("element", factory.createAttribute(new QName("attribute"), "second")));
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

        String created = out.toString();
View Full Code Here

        Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
        pipe.addComponent(new XMLGenerator(input));
        XMLEventFactory factory = XMLEventFactory.newInstance();
        pipe.addComponent(new CleaningTransformer());
        pipe.addComponent(new SubSetTransformer("element", factory.createAttribute(new QName("attribute"), "second"),
                factory.createAttribute(new QName("attribute"), "first")));
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();
View Full Code Here

        ByteArrayOutputStream out = new ByteArrayOutputStream();

        Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
        pipe.addComponent(new XMLGenerator(input));
        pipe.addComponent(new SubSetTransformer("element"));
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

        String created = out.toString();
View Full Code Here

TOP

Related Classes of org.apache.cocoon.stax.sample.src.SubSetTransformer

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.