title: Add XML document as child to another node in Javascript
body: <p>I have a question: I'm getting in Javascript XML. I want to add a 'father' node
  to that xml.
  How do I do that?</p>
  
  <pre><code>/* Load the XML text from the text area to a Javascript XML object */
  var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async = "false";
  xmlDoc.loadXML(taData.innerText);
  xmlObj = xmlDoc.documentElement;        
  
  /* Creating the Screen node */
  var Screen = document.createElement("Screen");
  Screen.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
  Screen.setAttribute("xsi:noNamespaceSchemaLocation", "../../GUIGenerator_V2/Scheme/GG_Scheme.xsd");
  
  /* Creating the Legend node */
  var Legend = document.createElement("Legend");
  Legend.setAttribute("EntityType", "Request");
  
  var ImportedNode = document.adopteNode(xmlDoc.documentElement);
  Legend.appendChild(ImportedNode);
  Screen.appendChild(Legend);
  </code></pre>
  
  <p>Legend is the child of Screen, And I want to make the xmlDoc a child of Legend.</p>
  
  <p>I have tried to write: Legend.appendChild(xmlDoc.documentElement);
  but getting an error. What can be the problem?</p>