I'm trying to write to an XML file to the isolated storage but I would like to format it like this:-
<SampleData>
<Item Property1="AliquaXX" />
<Item Property1="Integer" />
<Item Property1="Quisque" />
<Item Property1="Aenean" />
<Item Property1="Mauris" />
<Item Property1="Vivamus" />
<Item Property1="Nullam" />
<Item Property1="Nam" />
<Item Property1="Sed" />
<Item Property1="Class" />
</SampleData>
but I'm buggered if I can work it out, can anyone help?
You can customize the xml output via the XmlWriterSettings.
You didn't include any code, but you can set the XmlWriterSettings when you create the XmlWriter. You can also just use something like:
var myXmlWriter = new XmlWriterSettings { Indent = true };