Properly create the xml