Read XML Node - CSharp System.Xml

CSharp examples for System.Xml:XML Node

Description

Read XML Node

Demo Code


using System.Xml;

public class Main{
        public static XmlNode ReadNode(XmlReader reader)
      {//w  w  w  .j  a v  a 2  s.  c o  m
         XmlDocument document = new XmlDocument();
         document.Load(reader);
         return document.DocumentElement;
      }
        public static XmlNode ReadNode(string xml)
      {
         XmlDocument document = new XmlDocument();
         document.LoadXml(xml);
         return document.DocumentElement;
      }
}

Related Tutorials