first make form like : - now double click on button and write code like : ///////////////////////// CODE //////////////////////////// using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Xml; using System.Windows.Forms; namespace Xml_File_Operation { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button3_Click(object sender, EventArgs e) { XmlDocument xdoc1 = new XmlDocument(); xdoc1.Load("C:\\Users\\Nirav\\Desktop\\people1.xml"); XmlNode person = xdoc1.CreateElement("person"); XmlNode name = xdoc1.CreateElement("name"); name.InnerText = textBox1.Text; person.AppendChild(name); XmlNode age = xdoc1.Creat...
Comments
Post a Comment