xml.DomDocument.appendDocumentNode

Adds a child DomNode object to the end of the DomNode children for this DomDocument object.

Syntax

appendDocumentNode(
   n xml.DomNode )
  1. n defines the node to add.

Usage

Adds a child xml.DomNode object to the end of the DomNode children for this DomDocument object, where n is the node to add.

Only Text nodes, Processing Instruction nodes, Document Fragment nodes, one Element node, and one Document Type node allowed.

Note: A fragment is a structure created to receive XML nodes that are not always valid. Once a fragment is added to a valid node, the fragment becomes empty as all nodes are moved from the fragment as a child to a valid node. So developers can work on the fragment until it is added to another node. At that time developers should no longer work on the fragment but rather on the valid node.

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).