title: VBScript create XML
body: <p>I am creating a VBScript to create an XML file.
  Got kind of stuck to get the following structure:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Root&gt;
    &lt;tag&gt;
      &lt;a&gt;&lt;/a&gt;
      &lt;b&gt;&lt;/b&gt;
      &lt;c&gt;&lt;/c&gt;
    &lt;/tag&gt;
    &lt;tag&gt;
      &lt;a&gt;&lt;/a&gt;
      &lt;b&gt;&lt;/b&gt;
      &lt;c&gt;&lt;!-- this --&gt;
        &lt;c1&gt;&lt;/c1&gt;
        &lt;c2&gt;&lt;/c2&gt;
        &lt;c3&gt;&lt;/c3&gt;
      &lt;/c&gt;
    &lt;/tag&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>The code im using now is:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Set xmlDoc = CreateObject("Msxml2.DOMDocument.6.0")  
  
  Set objRoot = xmlDoc.createElement("Root")  
  xmlDoc.appendChild objRoot  
  
  Set objRecord = xmlDoc.createElement("tag") 
  objRoot.appendChild objRecord
  
  Set objName = xmlDoc.createElement("a")  
  objName.Text = "a"
  objRecord.appendChild objName  
  
  Set objName = xmlDoc.createElement("b")  
  objName.Text = "b"
  objRecord.appendChild objName
  
  Set objName = xmlDoc.createElement("c")  
  objName.Text = "c"
  objRecord.appendChild objName
  </code></pre>
  
  <p>For <code>&lt;tag&gt;</code> #2 I'm basicly doing the same, but I don't see how to get another tag open for c1, c2 and c3. I have tried playing with the <code>appendChild</code>, but it's not visible or its there as another "tag" level.</p>
  
  <p>I have been searching for an explanation of the <code>appendChild</code>, <code>objName</code>, and <code>objRecord</code>, but im failing to find some decent information.</p>