GetNode
Find child by name
TreeNode GetNode( LPCSTR Name, BOOL bCaseSensitive = true )
The treenode whose name matches the given tagName.
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); }
origin.h