Udostępnij za pośrednictwem


IElement.RemoveAttributeNS(String, String) Method

Definition

Removes an attribute by local name and namespace URI.

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

Parameters

namespaceURI
String

The namespace URI of the attribute to remove.

localName
String

The local name of the attribute to remove.

Attributes

Exceptions

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
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

Removes an attribute by local name and namespace URI. If a default value for the removed attribute is defined in the DTD, a new attribute immediately appears with the default value as well as the corresponding namespace URI, local name, and prefix when applicable. The implementation may handle default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date. <br>If no attribute with this local name and namespace URI is found, this method has no effect. <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.removeAttributeNS(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