i want to write some data in XML file using metro style app (.Net Framework 4.5).
here is the code which i have written and it works fine but problem is that the whole string is being written in s single line instead of XML text formatting. Therefore i can't read it properly. Every time i need to reformat the newly added data to understand it properly.
Here is the code i have written :
Dim f As New FolderPicker
f.SuggestedStartLocation = PickerLocationId.DocumentsLibrary
f.ViewMode = PickerViewMode.Thumbnail
Dim folder As StorageFolder = Await f.PickSingleFolderAsync
Dim rootEle As XmlElement
Dim file As StorageFile = Nothing
file = Await folder.CreateFileAsync("demoXML.xml", CreationCollisionOption.ReplaceExisting)
rootEle = doc.CreateElement("files_tbl")
Dim ele As XmlElement
ele = doc.CreateElement("files")
Dim otherEle As XmlElement
otherEle = doc.CreateElement("field-1")
otherEle.InnerText = "data-1"
otherEle = doc.CreateElement("field-2")
otherEle.InnerText = "data-2"
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)