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?>
Check the Settings property:
w.Settings.Indent = true;
Edit: You can't set it directly:
System.Xml.XmlWriter.Create("path", new System.Xml.XmlWriterSettings())