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...
- First you have to declare it with board rate 9600 Serial.begin(9600); - Then we check is serial port is available. If available then we write data to it. if (Serial.available()>0) { Serial.Write(byte data); }
Note : for this code you have to make on "people1.xml" file on to the desktop.than run this code. ////////////////////// people1.xml ////////////////////// <people> <person> <name>nirav</name> <age>20</age> <email> n005nirav@gmail.com </email> </person> <person> <name>vijay</name> <age>21</age> <email> vijay@gmail.com </email> </person> </people> //////////////////////////////////////////////////////////////////// First create form like : - now double click on button and write this code . ///////////////// 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 {...
Comments
Post a Comment