InsertNode
Insert a child node.
TreeNode InsertNode( const TreeNode & trBefore, LPCSTR lpcszTagName, int nChildID = -1 )
The inserted node
EX1
void TreeNode_InsertNode_ex1() { Tree myTree; TreeNode tn1, tn2, tn3; tn1 = myTree.AddNumericNode(123, "node1", 1); tn2 = myTree.AddTextNode("abc", "node2", 2); tn3 = tn2.AddTextNode("abc", "node3", 2); tn3 = tn2.InsertNode(tn3, "abcd"); out_tree(myTree); bool flag1 = tn3.Replace(tn1, TRUE); if(flag1) printf("node3 successfully replaced \n"); out_tree(myTree); }
TreeNode::AddNode, TreeNode::Replace, TreeNode::AddTextNode, TreeNode::AddNumericNode
origin.h