Create XML Root Element - CSharp System.Xml

CSharp examples for System.Xml:XML Element

Description

Create XML Root Element

Demo Code


using System.Xml;
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from  w ww .  j  a v a 2  s  . c  om

public class Main{
        private static XmlElement CreateRootElement(string xmlString)
        {
            XmlDocument document = new XmlDocument();
            document.LoadXml(xmlString);
            return document.DocumentElement;
        }
}

Related Tutorials