HtmlAgilityPack.HtmlNodeNavigator.GetAttribute C# (CSharp) Method

GetAttribute() public method

Gets the value of the HTML attribute with the specified LocalName and NamespaceURI.
public GetAttribute ( string localName, string namespaceURI ) : string
localName string The local name of the HTML attribute.
namespaceURI string The namespace URI of the attribute. Unsupported with the HtmlNavigator implementation.
return string
        public override string GetAttribute(string localName, string namespaceURI)
        {
            InternalTrace("localName=" + localName + ", namespaceURI=" + namespaceURI);
            HtmlAttribute att = _currentnode.Attributes[localName];
            if (att == null)
            {
                InternalTrace(">null");
                return null;
            }
            InternalTrace(">" + att.Value);
            return att.Value;
        }