importNode
Description
Import a node from another document into the current document.
Example
The following example shows how importNode() can be used to insert a snippet of XML into a document.
var snippet = Editor.XML.createNativeXMLDocument("<paragraph>Hello World!</paragraph>");
var doc = Editor.getActiveDocument();
var imported = doc.importNode(snippet.documentElement, true);
doc.selectSingleNode("//*[paragraph]").appendChild(imported);
Syntax
XopusDocument .importNode (importedNode : Node, deep : Boolean) : XopusNode
Arguments
- importedNode
-
Node. The node to be imported - deep
-
Boolean.trueif childnodes should be imported also.
Return Value
XopusNode . The imported node.
History
| version | event |
|---|---|
| Xopus 3.2.6 | Introduction. |