How to clone Element objects in Python xml.etree? I'm trying to procedurally move and copy (then modify their attributes) nodes.
Element
xml.etree
You can just use copy.deepcopy() to make a copy of the element. (this will also work with lxml by the way).
2.1m questions
2.1m answers
60 comments
57.0k users