set XML CDATA Section - CSharp System.Xml

CSharp examples for System.Xml:CData

Description

set XML CDATA Section

Demo Code


using System.Xml;
using System.Collections.Generic;
using System.Collections;
using System;/* w  w  w  .j  av  a  2s .  c om*/

public class Main{
        public static void setCDATASection(XmlElement message, String msg)
      {
         XmlCDataSection cdata = message.OwnerDocument.CreateCDataSection (msg);
         message.AppendChild (cdata);
      }
}

Related Tutorials