def _parse_dict(element, definition):
sub_dict = {}<EOL>for name, subdef in viewitems(definition):<EOL><INDENT>(name, required) = _parse_name(name)<EOL>sub_dict[name] = xml_to_json(element, subdef, required)<EOL><DEDENT>return sub_dict<EOL>
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