Udostępnij za pośrednictwem


IElement.HasAttributeNS(String, String) Method

Definition

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

[Android.Runtime.Register("hasAttributeNS", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetHasAttributeNS_Ljava_lang_String_Ljava_lang_String_Handler:Org.W3c.Dom.IElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool HasAttributeNS (string? namespaceURI, string? localName);
[<Android.Runtime.Register("hasAttributeNS", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetHasAttributeNS_Ljava_lang_String_Ljava_lang_String_Handler:Org.W3c.Dom.IElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member HasAttributeNS : string * string -> bool

Parameters

namespaceURI
String

The namespace URI of the attribute to look for.

localName
String

The local name of the attribute to look for.

Returns

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

Attributes

Exceptions

NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as []).

Remarks

Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise. <br>Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Added in DOM Level 2.

Java documentation for org.w3c.dom.Element.hasAttributeNS(java.lang.String, 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