예제 #1
0
        public Boolean HasAttribute(String name)
        {
            if (_namespace.Is(NamespaceNames.HtmlUri))
            {
                name = name.HtmlLower();
            }

            return(_attributes.GetNamedItem(name) != null);
        }
예제 #2
0
파일: Element.cs 프로젝트: howej/AngleSharp
        /// <summary>
        /// Returns a boolean value indicating whether the specified element
        /// has the specified attribute or not.
        /// </summary>
        /// <param name="name">The attributes name.</param>
        /// <returns>The return value of true or false.</returns>
        public Boolean HasAttribute(String name)
        {
            if (String.Equals(_namespace, Namespaces.HtmlUri, StringComparison.Ordinal))
            {
                name = name.ToLowerInvariant();
            }

            return(_attributes.GetNamedItem(name) != null);
        }