def _parse_dict(element, definition):
    """Parse xml element by a definition given in dict format.

    :param element: ElementTree element
    :param definition: definition schema
    :type definition: dict
    :return: parsed xml
    :rtype: dict
    """
    sub_dict = {}

    for name, subdef in viewitems(definition):
        (name, required) = _parse_name(name)

        sub_dict[name] = xml_to_json(element, subdef, required)

    return sub_dict
Parse xml element by a definition given in dict format.

    :param element: ElementTree element
    :param definition: definition schema
    :type definition: dict
    :return: parsed xml
    :rtype: dict