xml.DomDocument.importNode

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

Syntax

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

Usage

Imports a xml.DomNode object from a DomDocument object into its new context (attached to this DomDocument object), where n 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 xml.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).