CSharp examples for System.Xml:XML Attribute
Get XML Attribute from XmlNode
using System.Xml; using System;/*from ww w. j a v a2s . c o m*/ public class Main{ public static String GetAttribute(this XmlNode xmlNode, String attrName) { foreach (XmlNode node in xmlNode.ChildNodes) { if (String.Compare(node.Name, attrName, true) == 0) { return node.InnerText; } } return null; } }