NodeDuplicate ()

Duplicate a node in the data base in the given new address.

Usage

NodeDuplicate( path, newAddr )

Parameters

path (string)
Data base path of the node.
newAddr (string)
Data base path of the duplicated node.

Return Value

None

Errors

The path and newAddr should be valid.

Description

This routine duplicates a node and all its children. It copies the nodes hanging from the source node into the destination node. The source node is given by path and the destination node is given by newAddr. For example,
node = item.getPath()
(oldName, newName) = item.duplicate()
if oldName != newName:
      oldPath = node + RS + oldName
      newPath = node + RS + newName
NodeDuplicate( oldPath, newPath )