IDocument.CreateAttribute(String) Method

Definition

Creates an <code>Attr</code> of the given name.

[Android.Runtime.Register("createAttribute", "(Ljava/lang/String;)Lorg/w3c/dom/Attr;", "GetCreateAttribute_Ljava_lang_String_Handler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.W3c.Dom.IAttr? CreateAttribute (string? name);
[<Android.Runtime.Register("createAttribute", "(Ljava/lang/String;)Lorg/w3c/dom/Attr;", "GetCreateAttribute_Ljava_lang_String_Handler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CreateAttribute : string -> Org.W3c.Dom.IAttr

Parameters

name
String

The name of the attribute.

Returns

IAttr

A new <code>Attr</code> object with the <code>nodeName</code> attribute set to <code>name</code>, and <code>localName</code>, <code>prefix</code>, and <code>namespaceURI</code> set to <code>null</code>. The value of the attribute is the empty string.

Attributes

Exceptions

INVALID_CHARACTER_ERR: Raised if the specified name is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute.

Remarks

Java documentation for org.w3c.dom.Document.createAttribute(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