how to get hirearchy xml throug linq
<p>i want to generate the following xml through linq</p>

<pre><code>&lt;Items EntityTypeId="1" name="Organization"&gt;
  &lt;Items id="2" name="Managment Team"&gt;
    &lt;Items id="3" name="CEO"&gt;
      &lt;Items id="6" name="VP Tech" /&gt;
    &lt;/Items&gt;
    &lt;Items id="4" name="CFO"&gt;
      &lt;Items id="7" name="VP finance" /&gt;
    &lt;/Items&gt;
    &lt;Items id="5" name="CTO" /&gt;
  &lt;/Items&gt;
&lt;/Items&gt;
</code></pre>

<p>i have a list of data with id and their parent id.
can anyone help me?</p>
