import re


def namespace(element):
    """
    Gets XML namespace of element

    :param element: element, whose tag carry namespace
    :return: namespace of element, if element does not have one, return empty string
    """

    m = re.match('\{.*\}', element.tag)
    return m.group(0) if m else ''