xml.DomDocument.importNode

Imports a DomNode from a DomDocument object into its new context (attached to a DomDocument object).

Syntax

importNode(
   node xml.DomNode
   deep INTEGER )
  RETURNING object xml.DomNode
  1. node is the node to import.
  2. deep is a boolean identifying whether to import the node only or the node and all its child nodes.

Usage

Imports a DomNode from a DomDocument object into its new context (attached to this DomDocument object), where node is the node to import. When deep is FALSE only the node is imported; when TRUE the node and all its child nodes are imported.

Returns the DomNode object that has been imported to this DomDocument, or NULL.

Document and Document Type nodes cannot be imported.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).