When using the default settings with the XmlSerializer it will output the XML as a formated value.
IE: something along these lines.
It is simple to parse the resulting XML and remove and newlines and tabs... using 'Indent = false', will still put elements on newlines no?