CSharp examples for System.Xml:XML Element
Update XML Element
// Copyright (c) 2006-2017 All Rights reserved * using System.Xml.XPath; using System.Xml; using System.IO;//from w w w. j av a2s . c o m using System.Globalization; using System; public class Main{ public static void UpdateElement(ref XmlDocument document, string Xpath, string newValue) { document.SelectSingleNode(Xpath).InnerText = newValue; } #endregion #region UpdateElement public static void UpdateElement(XmlElement element, string newValue) { element.InnerText = newValue; } }