You can use XmlWriterSettingsline breaks to control your characters:
XmlWriterSettings xws = new XmlWriterSettings();
xws.NewLineChars = "\r\n";
using (XmlWriter xw = XmlWriter.Create("whatever.xml", xws))
{
xmlDocumentInstance.Save(xw);
}
No matter what you use to read in your XML, you can normalize line endings.
source
share