Now gives the right XML-standard and writes it to file.