2.2.3.16.3 Tree::Save

Description

Saves a tree to an XML file.

Syntax

BOOL Save( LPCSTR lpcszFile )

Parameters

lpcszFile
[input] the xml file name that store the tree info

Return

TRUE if the tree can be created; FALSE otherwise

Examples

EX1

void Tree_Save_ex1()
{
    Tree myTree;
    TreeNode tn1 = myTree.AddNode("Root");
    tn1.AddTextNode("abc", "SubNode1");
    tn1.AddTextNode("efg", "SubNode2");
 
    myTree.Save("c:\\myTree.xml");
}

Remark

See Also

Tree::Load

Header to Include

origin.h