title: how to get all child node in treeview of YUI
body: <p>I want all the childs of given node in YUI treeview. Condition is that if the child has sub-childs then I want sub-sub-child. that is all the childs of given node including subchilds.</p>
  
  <p>I think recursion may be the solution for this problem.Can anyone help me out this.  </p>
  
  <p>My current code is</p>
  
  <pre><code>if(curNode.hasChildren()) {
    for(var child = 0; child &lt; curNode.children.length;child++) {
      alert(curNode.children[child].label);
     }
  }
  </code></pre>
  
  <p>By this code, I only get the childrens of given node and not the sub-sub-child nodes.</p>