I am doing a CRUD of students and I am saving each of them in an XML file. The case is that when saving them, they are saved in the same line.
The code is this:
using(StreamWriter sr = File.AppendText(Xml))
using(XmlTextWriter xml = new XmlTextWriter(sr))
{
xml.WriteElementString(Xml, dataStudent);
}
And the output looks like this:
<.\student.xml>b4f6d4ca-ba74-4f33-9481-a24e3efffcfa, 54, Deni, Suco, 12/6/1972</.\student.xml><.\student.xml>cf98fab5-5b13-4c4c-849c-ebbb1c7157ab, 56, Sandy, Whoknows, 12/8/79</.\student.xml>
And I want that:
<.\student.xml>b4f6d4ca-ba74-4f33-9481-a24e3efffcfa, 54, Deni, Suco, 12/6/1972</.\student.xml>
<.\student.xml>cf98fab5-5b13-4c4c-849c-ebbb1c7157ab, 56, Sandy, Whoknows, 12/8/79</.\student.xml>