CSharp examples for System.Xml:XML Node
Read XML Node
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; } }