Create Xml Declaration - CSharp System.Xml

CSharp examples for System.Xml:XML Document

Description

Create Xml Declaration

Demo Code


using System.Xml;
using System.Collections.Generic;
using System;/*  w  ww.  j  a va  2  s.c o m*/

public class Main{
        public static void CreateXmlDeclaration(XmlDocument _doc)
      {
         XmlDeclaration declaration = _doc.CreateXmlDeclaration("1.0", "utf-8", "");
         _doc.AppendChild(declaration);
      }
}

Related Tutorials