All my searches have brought up people asking the opposite, but I have a file which grows by nearly 50% if it is saved with line returns and indentation.
Is there any wa
Use XmlWriterSettings:
XmlDocument xmlDoc = new XmlDocument(); [...] XmlWriterSettings xwsSettings = new XmlWriterSettings(); xwsSettings.Indent = false; xwsSettings.NewLineChars = String.Empty; using (XmlWriter xwWriter = XmlWriter.Create(@"c:\test.xml", xwsSettings)) xmlDoc.Save(xwWriter);