def etree_to_dict(tree):
    """Translate etree into dictionary.

    :param tree: etree dictionary object
    :type tree: <http://lxml.de/api/lxml.etree-module.html>

    """
    d = {tree.tag.split('}')[1]: map(
        etree_to_dict, tree.iterchildren()
    ) or tree.text}

    return d