def create_element_recursively(parent, path):
    nodes = path.split('/')
    node = parent
    for n_str in nodes:
        n = node.find(n_str)
        if (n is None):
            node = etree.SubElement(node, n_str)
        else:
            node = n
    return node
def create_element_recursively(parent, path):
    nodes = path.split('/')
    node = parent
    for n_str in nodes:
        n = node.find(n_str)
        if (n is None):
            node = etree.SubElement(node, n_str)
        else:
            node = n
    return node