Fix output xml file

check my modifications in xml_file.py, not is the most elegant solution, but it worked for me. 
perhaps the beginning of a permanent solution.