for i in root.iter(\'line\'): for j in i.iter(\'word\'): line_ids=i.get(\'id\') words=j.find(\'text\').text\'