If you change a value, it doesn't save the file automatically. If you're ready updating your file, save it using the
Save
method:
private void btnUpdate_Click(object sender, EventArgs e)
{
XmlDocument doc = new XmlDocument();
doc.Load(@"users.xml");
XmlNodeList elem = doc.GetElementsByTagName("ID");
foreach (XmlNode gettags in elem)
{
gettags.FirstChild.InnerText = "needed";
gettags.FirstChild.Value="needed";
MessageBox.Show(gettags.FirstChild.InnerText);
}
doc.Save("users.xml");
}