Smooks smooks = new Smooks();
StringResult result = new StringResult();
smooks.setFilterSettings(filterSettings);
smooks.addVisitor(new SetElementData().setElementName("c"), "b");
smooks.addVisitor(new RemoveAttribute().setName("xmlns:xxx").setNamespace(XMLConstants.XMLNS_ATTRIBUTE_NS_URI), "z");
smooks.addVisitor(new SetElementData().setElementNamespace("http://yyy").setElementName("yyy:z").
setAttribute(new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "yyy", "xmlns"), "http://yyy"), "z");
smooks.filterSource(new StringSource("<a><c><d><xxx:z xmlns:xxx=\"http://xxx\">some text</xxx:z></d></c></a>"), result);