Generate the xml file