erminas.SmartAPI.Utils.XmlUtil.GetAttributeValue C# (CSharp) Method

GetAttributeValue() public static method

Gets the value of an attribute. If the attribute does not exists, null is returned.
public static GetAttributeValue ( this xmlElement, string attributeName ) : string
xmlElement this The node
attributeName string Name of the attribute
return string
        public static string GetAttributeValue(this XmlElement xmlElement, string attributeName)
        {
            XmlAttribute attr = xmlElement.Attributes[attributeName];
            return attr == null ? null : attr.Value;
        }