def extract_xml_list(elements):
keywords = (re.split(r'<STR_LIT>',f.text) for f in elements if f.text)<EOL>flattened = (item.strip() for sublist in keywords for item in sublist)<EOL>remove_blank = [_f for _f in flattened if _f]<EOL>return remove_blank<EOL>
Some people don't have seperate tags for their keywords and seperate them with
a newline. This will extract out all of the keywords correctly.