create tree structure from an xml
<p>i have a XML like</p>

<pre><code>&lt;rootXml&gt;
    &lt;category id="1" name="Dept 1" folderPath="/css" leftHt="400"
        leftWd="50" rightHt="400" rightWd="50"&gt;
        &lt;category id="2" name="Service 1" folderPath="/news/world"&gt;&lt;/category&gt;
        &lt;category id="3" name="Service 2" folderPath="/news/local"&gt;&lt;/category&gt;
        &lt;category id="4" name="Service 3" folderPath="/news/crime"&gt;&lt;/category&gt;
        &lt;category id="5" name="Service 4" folderPath="/news/humaninterest"&gt;&lt;/category&gt;
    &lt;/category&gt;
&lt;/rootXml&gt;
</code></pre>

<p>i want to create a tree structure in jsp that displays like</p>

<pre><code>Dept1 
   Service1
   Service2
   Service3
   Service4
</code></pre>

<p>basically on clicking parent node its child should be displayed..</p>

<p>i used dojo before but its quite heavy and want to develop it by my own code. i have the DOM object of the xml with me with all the data, how to proceed next?</p>
