I am writing some data to XML file...but when I open it all the values are in a single line...how can write it in readable format?ie each node in new line and indentation?>
Set the Formatting Property of the XmlTextWriter:
TextWriter textWriter; var xmlTextWriter = new XmlTextWriter(textWriter); xmlTextWriter.Formatting = Formatting.Indented;