def get_structure(root):
    """Recursively build the xml structure of the given root element
    """
    structure = {}
    for child in root:
        if child.tag not in structure:
            structure[child.tag] = get_structure(child)
    return structure