code: def insert_xml_element(root, element_path):
      
      element_path = element_path.split('/')
      parent = root
      # iterate all parents of the missing element
      for level in range(len(element_path)):
          path = '/'.join(element_path[0:level + 1])
          tag = element_path[level]
          element = root.find(path, XML_NS)
          if element is None:
              # if a parent is missing insert it at the right place
              element = ElementTree.SubElement(parent, tag)
          parent = element
      return element
docs: insert an XML element in an other creating the needed parents.
      :param root: The container
      :type root: ElementTree.Element
      :param element_path: The path relative to root
      :type element_path: str
      :return: ElementTree.Element
      :rtype : ElementTree.Element