IDocument.CreateElement(String) Method

Definition

Creates an element of the type specified.

[Android.Runtime.Register("createElement", "(Ljava/lang/String;)Lorg/w3c/dom/Element;", "GetCreateElement_Ljava_lang_String_Handler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.W3c.Dom.IElement? CreateElement (string? tagName);
[<Android.Runtime.Register("createElement", "(Ljava/lang/String;)Lorg/w3c/dom/Element;", "GetCreateElement_Ljava_lang_String_Handler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CreateElement : string -> Org.W3c.Dom.IElement

Parameters

tagName
String

The name of the element type to instantiate. For XML, this is case-sensitive, otherwise it depends on the case-sensitivity of the markup language in use. In that case, the name is mapped to the canonical form of that markup by the DOM implementation.

Returns

IElement

A new <code>Element</code> object with the <code>nodeName</code> attribute set to <code>tagName</code>, and <code>localName</code>, <code>prefix</code>, and <code>namespaceURI</code> set to <code>null</code>.

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.createElement(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