createNode

Creates new node based on a valid class name.

Note: You cannot use the createNode method to create any of the following XML Form Object Model objects:

Syntax

Reference_Syntax.createNode( STRING param1 [, STRING param2 [, STRING param3 ] ] )

Parameters

param1

A valid string representing the class name of the object to create.

param2 (Optional)

A valid string representing the name to assign to the node. If empty, the value of this parameter defaults to an empty string.

param3 (Optional)

A valid string representing the XML namespace that the created node will exist in. If empty, the value of this parameter defaults to an empty string.

Returns

An object representing a valid node.

Applies to

model class class.

Version

XFA 2.1

Examples

JavaScript

// Create a node of type dataGroup. 
var oGroupNode = xfa.datasets.createNode("dataGroup", "NewGroupNode");

FormCalc

// Create a node of type dataGroup. 
var oGroupNode = xfa.datasets.createNode("dataGroup", "NewGroupNode")

// Ethnio survey code removed