AddNode method
The AddNode method adds a node to the Setup DCO object at the end of the section for the type specified (batch, document, page, field, character).
Syntax
- VBScript
oSO.AddNode (Type as Long, Name as String) as Boolean
- C#
bool AddNode(int nType, string lpszNodeName)
Arguments
- nType
- Specify one of the following number values to indicate the type of node to add:
- 0 = Batch
- 1 = Document
- 2 = Page
- 3 = Field
- 4 = Character
- lpszNodeName
- The name of the new node. This name is referenced as the node's type attribute in the Setup DCO file, as shown in this example:
- <D type="NewDocNode">
Returns
Returns true if successful; returns false if unsuccessful.
C# example
The following example adds a document node to the Setup DCO:m_oDCOSetup.AddNode(1, "NewDocNode");
The new node inherits its attributes and variables from the object template in the file C:\Datacap\dcshared\dcotemp.xml. The resulting Setup object is shown in this sample:
<D type="NewDocNode">
<V n="ID">0</V>
<V n="TYPE">Document</V>
<V n="STATUS">0</V>
<V n="DOC DATA">0</V>
<V n="MIN_TYPES">0</V>
<V n="MAX_TYPES">0</V>
</D>