CSharp examples for System.Xml:XML Node
Add XML CData Node
using System.Text.RegularExpressions; using System.Xml; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w ww. ja v a 2 s.co m*/ public class Main{ public static XmlNode AddCDataNode(XmlNode fathernode, string name, string content) { XmlDocument xdoc = fathernode.OwnerDocument; XmlNode snode = xdoc.CreateElement(name); XmlCDataSection CData = xdoc.CreateCDataSection(content); snode.AppendChild((XmlNode)CData); fathernode.AppendChild(snode); return snode; } }