Python Script to generate XML file