IElement.HasAttribute(String) Method

Definition

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

[Android.Runtime.Register("hasAttribute", "(Ljava/lang/String;)Z", "GetHasAttribute_Ljava_lang_String_Handler:Org.W3c.Dom.IElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool HasAttribute (string? name);
[<Android.Runtime.Register("hasAttribute", "(Ljava/lang/String;)Z", "GetHasAttribute_Ljava_lang_String_Handler:Org.W3c.Dom.IElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member HasAttribute : string -> bool

Parameters

name
String

The name of the attribute to look for.

Returns

true if an attribute with the given name is specified on this element or has a default value, false otherwise.

Attributes

Remarks

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

Added in DOM Level 2.

Java documentation for org.w3c.dom.Element.hasAttribute(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to