/// <summary> /// Checks whether the element has any attributes with the specified name and value. /// </summary> /// <param name="attributeName">Use wildcards at the beginning or the end, or both, for any value.</param> /// <param name="attributeValue">Use wildcards at the beginning or the end, or both, for any value.</param> public static bool HasAttribute(this HtmlAgilityPack.HtmlNode source, string attributeName, string attributeValue) { return(source.HasAttribute(attributeName, attributeValue, "")); }
/// <summary> /// Checks whether the element has class attribute with the specific value. /// </summary> /// <param name="@class">Use wildcards at the beginning or the end, or both, for any value.</param> public static bool HasClassAttribute(this HtmlAgilityPack.HtmlNode source, string value) => source.HasAttribute("class", value);
/// <summary> /// Checks whether the element has any attributes with the specified name. /// </summary> /// <param name="attributeName">Use wildcards at the beginning or the end, or both, for any value.</param> public static bool HasAttribute(this HtmlAgilityPack.HtmlNode source, string attributeName) => source.HasAttribute(attributeName, "*", "");