IDocument.ImportNode(INode, Boolean) Method

Definition

Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.

[Android.Runtime.Register("importNode", "(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;", "GetImportNode_Lorg_w3c_dom_Node_ZHandler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.W3c.Dom.INode? ImportNode (Org.W3c.Dom.INode? importedNode, bool deep);
[<Android.Runtime.Register("importNode", "(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;", "GetImportNode_Lorg_w3c_dom_Node_ZHandler:Org.W3c.Dom.IDocumentInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ImportNode : Org.W3c.Dom.INode * bool -> Org.W3c.Dom.INode

Parameters

importedNode
INode

The node to import.

deep
Boolean

If <code>true</code>, recursively import the subtree under the specified node; if <code>false</code>, import only the node itself, as explained above. This has no effect on nodes that cannot have any children, and on <code>Attr</code>, and <code>EntityReference</code> nodes.

Returns

INode

The imported node that belongs to this <code>Document</code>.

Attributes

Exceptions

NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
INVALID_CHARACTER_ERR: Raised if one of the imported names is not an XML name according to the XML version in use specified in the Document.xmlVersion attribute. This may happen when importing an XML 1.1 [] element into an XML 1.0 document, for instance.

Remarks

Java documentation for org.w3c.dom.Document.importNode(org.w3c.dom.Node, boolean).

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