<p>I have managed to create an <a href="http://docs.sencha.com/ext-js/3-4/#!/api/Ext.tree.TreeNode" rel="nofollow noreferrer">Ext.tree.TreePanel</a> that loads child nodes dynamically, but I'm having a difficult time clearing the tree and loading it with new data.  Can someone help me with the code to do this?</p>

I finally found an answer in their forums.  For anyone interested it is here:
```
```
if (tree)
{
    var delNode;
    while (delNode = tree.root.childNodes[0])
        tree.root.removeChild(delNode);
}
```
```