Condividi tramite


IElement.GetAttributeNS(String, String) Method

Definition

Retrieves an attribute value by local name and namespace URI.

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

Parameters

namespaceURI
String

The namespace URI of the attribute to retrieve.

localName
String

The local name of the attribute to retrieve.

Returns

The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

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

Retrieves an attribute value by local name and namespace URI. <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.getAttributeNS(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