def _parse_scheme(self, ele, scheme):
res = {}<EOL>for aKey in scheme:<EOL><INDENT>entity = scheme[aKey]<EOL>val = []<EOL>matches = []<EOL>res[aKey] = []<EOL>if "<STR_LIT>" in entity:<EOL><INDENT>matches = self._get_tag_match(ele, entity['<STR_LIT>'])<EOL>if not matches:<EOL><INDENT>matches = []<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT>if not matches and "<STR_LIT:value>" == aKey:<EOL><INDENT>val.extend(self._parse_value([ele], entity))<EOL>res[aKey].extend(val)<EOL><DEDENT>if "<STR_LIT:value>" == aKey:<EOL><INDENT>for a in matches:<EOL><INDENT>val.extend(self._parse_value([ele], entity))<EOL><DEDENT><DEDENT>if "<STR_LIT>" in entity:<EOL><INDENT>for a in matches:<EOL><INDENT>obj = {}<EOL>if "<STR_LIT:value>" == aKey:<EOL><INDENT>obj['<STR_LIT:value>'] = val<EOL><DEDENT>child = self._parse_scheme(a, entity['<STR_LIT>'])<EOL>if child:<EOL><INDENT>obj.update(child)<EOL><DEDENT>if obj:<EOL><INDENT>res[aKey].append(obj)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return res<EOL>
:param ele:
:type ele:
:param scheme:
:type scheme: dict[str |unicode, dict]
:return:
:rtype: dict