When using the default settings with the XmlSerializer it will output the XML as a formated value.
IE: something along these lines.
..
XmlSerializer xmlser = new XmlSerializer(...); XmlWriterSettings settings = new XmlWriterSettings {Indent = false}; using (XmlWriter xw = XmlWriter.Create(stream, settings)) {
...