DeleteNodeByName Method
The DeleteNodeByName method deletes a node from the Setup DCO by referencing the node's name.
Description
DeleteNodeByName references a node through the node's name, and deletes the node.
Syntax
- VBScript
oSO.DeleteNode(nType as Long, lpszName as String) as Boolean
- C#
bool DeleteNodeByName(int nType, string lpszName)
Arguments
- nType
- The type of the node to delete:
- 0 = Batch
- 1 = Document
- 2 = Page
- 3 = Field
- 4 = Character
- lpszName
- The name of the node to delete, as referenced in the node's type
attribute:
<D type="NewDocNode">
Returns
True if successful; False otherwise.VBScript Example
Dim OK
OK = oSO.DeleteNodeByName(3, "Total")
msgbox OK
msgbox "The number of fields remaining is " & oSO.NumOfNodes(3)
C# Example
The following example deletes the document node, "NewDocNode," from the Setup DCO:m_oDCOSetup.DeleteNode(1, "NewDocNode");