IDocument.RenameNode(INode, String, String) Method

Definition

Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.

[Android.Runtime.Register("renameNode", "(Lorg/w3c/dom/Node;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Node;", "GetRenameNode_Lorg_w3c_dom_Node_Ljava_lang_String_Ljava_lang_String_Handler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.W3c.Dom.INode? RenameNode (Org.W3c.Dom.INode? n, string? namespaceURI, string? qualifiedName);
[<Android.Runtime.Register("renameNode", "(Lorg/w3c/dom/Node;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Node;", "GetRenameNode_Lorg_w3c_dom_Node_Ljava_lang_String_Ljava_lang_String_Handler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RenameNode : Org.W3c.Dom.INode * string * string -> Org.W3c.Dom.INode

Parameters

n
INode

The node to rename.

namespaceURI
String

The new namespace URI.

qualifiedName
String

The new qualified name.

Returns

INode
Attributes

Exceptions

NOT_SUPPORTED_ERR: Raised when the type of the specified node is neither ELEMENT_NODE nor ATTRIBUTE_NODE, or if the implementation does not support the renaming of the document element.
INVALID_CHARACTER_ERR: Raised if the new qualified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.
WRONG_DOCUMENT_ERR: Raised when the specified node was created from a different document than this document.
NAMESPACE_ERR: Raised if the qualifiedName is a malformed qualified name, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from "" [] . Also raised, when the node being renamed is an attribute, if the qualifiedName, or its prefix, is "xmlns" and the namespaceURI is different from "".

Remarks

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