I am saving my files as xml documents, using XDocument.Save(path), and after saving and loading a document all of the line breaks have changed from “/r/n” to “/n/”. Why is this happening and how can I fix it?
I am saving my files as xml documents, using XDocument.Save(path), and after saving and
Share
You can use
XmlWriterSettingsto control what your line-break characters are:Whatever you’re using to read in your XML might be normalizing your line endings.