title: Creating tree panel in ExtJs 4.0
body: <p>I want to build TreePanel from XML response.
  I am unclear about using TreeStore in TreePanel.
  Do we have to write our logic in tree panel to create parent/child structure.</p>
  
  <p><a href="https://stackoverflow.com/q/8697920/1125959">Migration from ExtJS 3.0 to 4.0</a></p>
  
  <p>@Chao : Thanks for reply. I saw that example and found useful. but my response XML is little different like:  </p>
  
  <pre><code> &lt;Root&gt;
      &lt;Folder&gt;
        &lt;CreateDate&gt;Jun 6, 2011&lt;/CreateDate&gt;
        &lt;CreatedBy&gt;1000&lt;/CreatedBy&gt;
        &lt;Files/&gt;
        &lt;FolderName&gt;Root folder&lt;/FolderName&gt;
       &lt;Folders&gt;
          &lt;Folder&gt;
            &lt;CreateDate&gt;Nov 30, 2011&lt;/CreateDate&gt;
              &lt;FolderName&gt;child folder 1 &lt;/FolderName&gt;
            &lt;Folders/&gt;
            &lt;Id&gt;13&lt;/Id&gt;
            &lt;ParentFolderId&gt;1&lt;/ParentFolderId&gt;
          &lt;/Folder&gt;
          &lt;Folder&gt;
             &lt;FolderName&gt;child folder 2&lt;/FolderName&gt;
            &lt;CreateDate&gt;Dec 1, 2011&lt;/CreateDate&gt;
            &lt;Folders&gt;
              &lt;Folder&gt;
                 &lt;FolderName&gt;sub child folder&lt;/FolderName&gt;
                &lt;CreateDate&gt;Dec 1, 2011&lt;/CreateDate&gt;
                &lt;Folders/&gt;
                &lt;Id&gt;27&lt;/Id&gt;
                &lt;ParentFolderId&gt;25&lt;/ParentFolderId&gt;
              &lt;/Folder&gt;
            &lt;/Folders&gt;
            &lt;Id&gt;25&lt;/Id&gt;
            &lt;ParentFolderId&gt;1&lt;/ParentFolderId&gt;
          &lt;/Folder&gt;
        &lt;/Folders&gt;
        &lt;Id&gt;1&lt;/Id&gt;
        &lt;ModBy/&gt;
        &lt;ModDate/&gt;
        &lt;ParentFolderId/&gt;
      &lt;/Folder&gt;
      &lt;/Root&gt;
  
      and want to build tree from this response.
      In extjs 3.0 the tree structure for this response was like:
  
      Root
      |__child folder 1
      |__child folder 2
         |__sub child folder
  </code></pre>