title: How do I create child elements using msxml parser?
body: <p>I have a users.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Data&gt;
      &lt;Users&gt;
          &lt;User name="xyz" email="xyz@xyz.com"&gt;
                      &lt;Tasks/&gt;
          &lt;/User&gt;
      &lt;/Users&gt;
  &lt;/Data&gt;
  </code></pre>
  
  <p>I have got a reference to <strong>Users</strong> element using the following code</p>
  
  <pre><code>IXMLDOMDocumentPtr pXMLDom;
  
  // code to load the xml dox
  
  IXMLDOMElementPtr pXMLDocElement = NULL;
  IXMLDOMNodeListPtr pXMLUsers = NULL;
  
  //gets &lt;Data&gt;
  pXMLDocElement = pXMLDom-&gt;GetdocumentElement();
  
  //gets &lt;Users&gt;
  pXMLUsers = pXMLDocElement-&gt;childNodes;
  </code></pre>
  
  <p>Now how do I create a child element <strong>User</strong> in <strong>Users</strong> element.</p>
  
  <p>I have tried using <code>createElement()</code> on <code>pXMLUsers</code>, but it says <code>IXMLDOMNodeListPtr has no member appendChild</code>.</p>
  
  <p>I don't know how to create a new element. </p>
  
  <p>Thanks.</p>