CSharp examples for System.Xml:XML Attribute
Get Attribute Value from XmlNode
using System.Xml; using System.Text; using System.Collections.Generic; using System;// w w w . j av a 2 s. com public class Main{ #region internal static string GetAttributeValue(XmlNode node, string attributeName) internal static string GetAttributeValue(XmlNode node, string attributeName) { string result = null; if (node != null) { XmlAttribute attribute = node.Attributes[attributeName]; if (attribute != null) result = attribute.Value; } return result; } }