code: def copy_of_xml_element(elem):
      
  
      copyElem = ElementTree.Element(elem.tag, elem.attrib)
      for child in elem:
          copyElem.append(child)
      return copyElem
docs: This method returns a shallow copy of a XML-Element.
      This method is for compatibility with Python 2.6 or earlier..
      In Python 2.7 you can use  'copyElem = elem.copy()'  instead.