I\'m trying to write to an XML file to the isolated storage but I would like to format it like this:-
-
I suspect you need to create an XmlWriterSettings with the behaviour you want (indentation etc) and then pass that to the XmlWriter
on creation. Just setting Indent to true may well be enough:
XmlWriterSettings settings = new XmlWriterSettings { Indent = true };
using (XmlWriter writer = XmlWriter.Create(..., settings))
{
...
}