in reply to Remove attribute in XML

xmlns is not an attribute, it's a namespace. How do you get the node, how do you clone it?
Update: code removed.