Set XML Node Value - CSharp System.Xml

CSharp examples for System.Xml:XML Node

Description

Set XML Node Value

Demo Code


using System.Xml;
using System;//ww  w.j av  a2 s.  com

public class Main{
        public static void SetNodeValue(XmlDocument pDoc, String pNodeIndex, String pNodeInnerText)
        {
            var selectSingleNode = pDoc.SelectSingleNode(pNodeIndex);
            if (selectSingleNode != null)
                selectSingleNode.InnerText = pNodeInnerText;
            
        }
}

Related Tutorials