Fix in xml export and add an xml header