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();
// The replace step is required since the jdk1.6 default implementation produces other chars
// than the woodstox implementation used for jdk1.5