2.2.3.17.15 TreeNode::GetNode

Description

Find child by name

Syntax

TreeNode GetNode( LPCSTR Name, BOOL bCaseSensitive = true )

Parameters

Name
[input] tagName of the node
bCaseSensitive
[input] true if tagName searching should be case sensitive, false will not.

Return

The treenode whose name matches the given tagName.

Examples

EX1

void TreeNode_GetNode_ex1()
{    
    Tree tr;
    TreeNode tn1, tn2, tn3;
    tn2 = tr.AddTextNode("abc", "node2", 2);
    tn3 = tn2.AddTextNode("efg", "node3", 3);	//tn3 is added to tn2 as its child
    out_tree(tr);
    
    tn1 = tn2.GetNode("node3");		//now tn1 is equal to tn3
    tr.AddNode(tn1);
    out_tree(tr);
}

Remark

See Also

Header to Include

origin.h