Script is working without issues.
For each entry it checks for duplicates and saves only unique entries.
Entries having the same name but different values are distinguished by appending "#" to the entry name.

It parses ":SAC:" questions and creates an xml file with all possible gloses for each word (gloses.xml).

It parses ":MC:" questions and creates an xml file with all possible gloses for each word (kalaba.xml).

DONE: Refactor code
PENDING: Add more comments
TODO: manage the remaining edge case = "questions retrouver sons des mots"