Org.W3c.Dom.IElement.SetAttributeNode Method
Adds a new attribute node.

Syntax

[Android.Runtime.Register("setAttributeNode", "(Lorg/w3c/dom/Attr;)Lorg/w3c/dom/Attr;", "GetSetAttributeNode_Lorg_w3c_dom_Attr_Handler:Org.W3c.Dom.IElementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public IAttr SetAttributeNode (IAttr newAttr)

Parameters

newAttr
The Attr node to add to the attribute list.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Org.W3c.Dom.DOMExceptionWRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.

NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

Remarks

Adds a new attribute node. If an attribute with that name ( nodeName) is already present in the element, it is replaced by the new one. Replacing an attribute node by itself has no effect.

To add a new attribute node with a qualified name and namespace URI, use the setAttributeNodeNS method.

[Android Documentation]

Requirements

Namespace: Org.W3c.Dom
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1