XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"C:\Well.xml"); XmlNode node = xmlDoc.SelectSingleNode("/gpx/waypoints/waypoint[@a='2']/name"); node.InnerText = "Something"; xmlDoc.Save(@"C:\Well.xml");