Removes the data element from the tree.
PROCEDURE DELETE_TREE_NODE
(item_name VARCHAR2,
node NODE);
PROCEDURE DELETE_TREE_NODE
(item_id ITEM,
node NODE);
Built-in Type unrestricted procedure
Enter Query Mode no
Removing a branch node also removes all child nodes.
This code finds a node with the label "Zetie" and deletes it and all of its children.
/*
** Built-in: DELETE_TREE_NODE
*/
DECLARE
htree ITEM;
delete_node FTREE.NODE;
BEGIN
/* Find the tree itself.
*/
htree := FIND_ITEM('tree_block.htree3');
/* Find the node with a label of "Zetie".
** Start searching from the root of the tree.
*/
delete_node := FTREE.FIND_TREE_NODE(htree,
'Zetie',
FTREE.FIND_NEXT,
FTREE.NODE_LABEL,
FTREE.ROOT_NODE,
FTREE.ROOT_NODE);
/* Delete the node and all of its children.
*/
IF NOT FTREE.ID_NULL(delete_node)
THEN FTREE.DELETE_TREE_NODE(htree, delete_node);
END IF;
END;