Working in progress: refactor the xml_write to handle two formats