@classmethod
def parse(cls, element):
    """Parse xml element.

        :param element: an :class:`~xml.etree.ElementTree.Element` instance
        :rtype: dict
        """
    values = {}
    for child in element:
        node = cls.get_node(child)
        subs = cls.parse(child)
        value = subs or node['value']
        if node['tag'] not in values:
            values[node['tag']] = value
        else:
            if not isinstance(values[node['tag']], list):
                values[node['tag']] = [values.pop(node['tag'])]
            values[node['tag']].append(value)
    return values
