hello !
i want to make a xml file to store my Settings such as server name , user name , and password , etc , i try to search how to read and write xml file i found this code for writing an xml file it works fine for me
private void XMLWrite()
{
FileStream fs = new FileStream("c:\\Server.xml", FileMode.Create);
XmlWriter w = XmlWriter.Create(fs);
w.WriteStartDocument();
w.WriteStartElement("Configuration");
// Write a product.
w.WriteStartElement("Parameters");
w.WriteAttributeString("servername", txtservername .Text );
w.WriteElementString("username", txtusername.Text );
w.WriteElementString("password",txtpassword.Text );
w.WriteEndElement();
w.WriteEndDocument();
w.Flush();
fs.Close();
}
now i have a prob , and prob is that ,i want to read it and show all these values in textboxes present on my form .for example , txtservername , txtusername, txtpassword.
please any one guide me to solve this issue .
Best Regards
M.Waqas Aslam