Insert an XML parent node to an existing xml document
<p>I have an XML document. I am trying to add a parent node to the xml document dynamically. How do i do. </p>

<p>Here is my xml </p>

<pre><code>  &lt;navdefinition&gt;
  &lt;link text="/and" href="/and"&gt;
      &lt;link text="Overview" href="/overview"  /&gt;
      &lt;link text="Information" href="/fo"/&gt;        
  &lt;/link&gt;
  &lt;/navdefinition&gt;
</code></pre>

<p>I am trying to add node to top of this so that one will be the new parent and one sibling at top </p>

<pre><code>    &lt;navdefinition&gt;
      &lt;link text="NewParent" href="/"&gt;
         &lt;link text="Sibling" href="/sibling"/&gt;
         &lt;link text="/and" href="/and"&gt;
             &lt;link text="Overview" href="/overview"  /&gt;
             &lt;link text="Information" href="/fo"/&gt;
         &lt;/link&gt;
      &lt;/link&gt;
  &lt;/navdefinition&gt;
</code></pre>