Package org.apache.cocoon.stax.component

Examples of org.apache.cocoon.stax.component.XMLSerializer


        ByteArrayOutputStream outputStAX = new ByteArrayOutputStream();

        NonCachingPipeline<StAXPipelineComponent> pipeStAX = new NonCachingPipeline<StAXPipelineComponent>();
        pipeStAX.addComponent(new XMLGenerator(input));
        pipeStAX.addComponent(new CleaningTransformer());
        pipeStAX.addComponent(new XMLSerializer());

        pipeStAX.setup(outputStAX);
        pipeStAX.execute();
        input.close();
View Full Code Here


        List<Attribute> atts = new ArrayList<Attribute>();
        atts.add(factory.createAttribute("attribute", "bad"));
        StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
                "anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        atts.add(factory.createAttribute("attribute", "bad"));
        atts.add(factory.createAttribute("attribute", "good"));
        StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
                "anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        List<Attribute> atts = new ArrayList<Attribute>();
        atts.add(factory.createAttribute("attribute", "bad"));
        StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
                "anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        List<Attribute> newAtts = new ArrayList<Attribute>();
        newAtts.add(factory.createAttribute("attribute", "good"));
        StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
                "anyelement", atts, newAtts);
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        atts.add(factory.createAttribute("attribute", "good"));
        List<Attribute> newAtts = new ArrayList<Attribute>();
        StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
                "anyelement", atts, newAtts);
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        ByteArrayOutputStream out = new ByteArrayOutputStream();

        Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
        pipe.addComponent(new XMLGenerator(input));
        pipe.addComponent(new ExampleAddTransformer("somethingdifferent", null));
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

        String created = out.toString();
        String correctOne = IOUtils.toString(AddTransformerTest.class.getResource(
View Full Code Here

        List<Attribute> newAtts = new ArrayList<Attribute>();
        newAtts.add(factory.createAttribute("attribute", "good"));
        StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
                "anyelement", atts, newAtts);
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        atts.add(factory.createAttribute("attribute", "good"));
        List<Attribute> newAtts = new ArrayList<Attribute>();
        StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
                "anyelement", atts, newAtts);
        pipe.addComponent(modifier);
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

        ByteArrayOutputStream out = new ByteArrayOutputStream();

        Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
        pipe.addComponent(new XMLGenerator(input));
        pipe.addComponent(new DaisyLinkRewriteTransformer("site/test/"));
        pipe.addComponent(new XMLSerializer());
        pipe.setup(out);
        pipe.execute();

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

TOP

Related Classes of org.apache.cocoon.stax.component.XMLSerializer

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.