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();