Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
DeletionTransformer deleter = new DeletionTransformer("anyelement", atts);
pipe.addComponent(deleter);
pipe.addComponent(new XMLSerializer());
ByteArrayOutputStream out = new ByteArrayOutputStream();
pipe.setup(out);