title: Add one xml element into another xml
body: <p>Please let me know how to do the following thing.</p>
  
  <p>XML Document 1 :</p>
  
  <pre><code>&lt;tag1 id="id1" name="myname"&gt;
        &lt;tag_child1 child1id="child1"&gt;&lt;/tag_child1&gt;
  &lt;/tag1&gt;
  </code></pre>
  
  <p>XML Document 2 :</p>
  
  <pre><code>&lt;tag_child2&gt;
      &lt;tagchild2_child3 child_childid = "child_child3"&gt; &lt;/tagchild2_child3&gt;
  &lt;/tag_child2&gt;
  </code></pre>
  
  <p>Final Document :</p>
  
  <pre><code>&lt;tag1 id="id1" name="myname"&gt;
        &lt;tag_child1 child1id="child1"&gt;&lt;/tag_child1&gt;
  
  &lt;!-- Document 2 --&gt;
        &lt;tag_child2&gt;
              &lt;tagchild2_child3 child_childid = "child_child3"&gt; &lt;/tagchild2_child3&gt;
        &lt;/tag_child2&gt;
  &lt;/tag1&gt;
  </code></pre>
  
  <p>I tried using appendChild() function in javascript.But I wasn't able to do it. Please help. Thanks</p>