Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > Creating a XMLFile
 

Creating a XMLFile

Hi,
The Below code is for Creating a XML, here my problem is it creatinng only one record then we add another record means its replacing the previous record
I want to add multiple records in xml how?

xmlw = new XmlTextWriter("c:\\sun.xml", null);
xmlw.WriteStartDocument();
xmlw.WriteStartElement("Company");
xmlw.WriteStartElement("Skills");
xmlw.WriteElementString("Microsoft", textBox1.Text);
xmlw.WriteElementString("Sun", textBox2.Text);
xmlw.WriteEndElement();
xmlw.WriteEndElement();
xmlw.WriteEndDocument();
xmlw.Close();
MessageBox.Show("Records Added");

Santhosh22  Tuesday, July 15, 2008 9:57 AM
Lucian Baciu  Wednesday, July 16, 2008 10:06 AM
Lucian Baciu  Wednesday, July 16, 2008 10:06 AM

You can use google to search for other answers

Custom Search

More Threads

• PocketVision fix...
• Anyone know where to get custom skins?
• Public Terrarium Server?
• Update on download availability?
• Is this app still alive?
• Outlook Calendar Look and Feel - Corrupts Form Designer
• Terrarium Server problems
• ??record video stream??
• How to play Terrarium
• How can we increase performance in vb.net ?