Is there a way to reset the Tree without loading a blank xm

Is there a way to reset the Tree without loading a
blank xml file?

The tree doesn�t have any special method for such
functionality. The following code can be used:

 

           
tree.deleteChildItems(0);

 

where 0 is ID of super root item, zero by default