Get Child XML Node - CSharp System.Xml

CSharp examples for System.Xml:XML Node

Description

Get Child XML Node

Demo Code


using System.Xml;

public class Main{
        public static XmlNode GetChildNode(XmlNode node, string name)
      {//from   w ww .ja v a  2 s  . c o m
         XmlNode attribute = node.Attributes[name];
         return (attribute == null) ? node[name] : attribute;
      }
}

Related Tutorials