Thats what I am asking I looped but i am getting error on follwoing line. It says its being in use IO Exception.

XmlTextWriter sch = null;
sch = new XmlTextWriter(filename, null); // ERROR
sch.Formatting = Formatting.Indented;
sch.Namespaces = false;
sch = new XmlTextWriter(filename, null);

The way I looped is:
Code:
for (int i = 0; i < scheduleListView.Items.Count; i++)
                    {
                        sch.WriteStartDocument();

                        sch.WriteStartElement("Schedules");

                        sch.WriteStartElement("Scheduler");
                        sch.WriteString(subjTextbox.Text);
                        sch.WriteEndElement();

                        sch.WriteStartElement("FileName");
                        sch.WriteString(textFile.Text);
                        sch.WriteEndElement();

                        sch.WriteStartElement("DateTime");
                        sch.WriteString(date.ToString());
                        sch.WriteEndElement();

                        sch.WriteEndElement();
                    }
                        sch.Flush();