def _parse_list(element, definition):
if len(definition) == <NUM_LIT:0>:<EOL><INDENT>raise XmlToJsonException('<STR_LIT>')<EOL><DEDENT>tag = definition[<NUM_LIT:0>]<EOL>tag_def = definition[<NUM_LIT:1>] if len(definition) > <NUM_LIT:1> else None<EOL>sub_list = []<EOL>for el in element.findall(tag):<EOL><INDENT>sub_list.append(xml_to_json(el, tag_def))<EOL><DEDENT>return sub_list<EOL>
Parse xml element by definition given by list.

    Find all elements matched by the string given as the first value
    in the list (as XPath or @attribute).

    If there is a second argument it will be handled as a definitions
    for the elements matched or the text when not.

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