CSharp examples for System.Xml:XML Node
Get Xml First Child Node
using System.Xml; using System.Text; using System.Linq; using System.Collections.Generic; using System;//from ww w . ja v a 2 s . c o m public class Main{ public static XmlNode GetXmlFirstChildNode(XmlNode parentNode) { XmlNodeList childNodes = parentNode.ChildNodes; for (int i = 0; i < childNodes.Count; i++) { XmlNode currNode = childNodes[i]; if (currNode.NodeType == XmlNodeType.Element) { return currNode; } } return null; } }