title: Looping through XML file using VBScript
body: <p>I have a XML file below ..I want to loop through this file and extract the node node value like for node com get the name value and then loop 2 times to get the file values.</p>
  
  <pre><code>&lt;common&gt;
    &lt;com name="Test1.css"&gt;
      &lt;file name="Tech.css"&gt;
      &lt;file name="Comp.css"&gt; 
    &lt;/com&gt;
    &lt;com name="Test2.css"&gt;
      &lt;file name="HR.css"&gt;
      &lt;file name="HR2.css"&gt; 
    &lt;/com&gt; 
  &lt;/common&gt;
  </code></pre>
  
  <p>I started using the below VBScript to start looping but I am getting an error Object required:Root
  Can someone please have a look and tell me what I am doing wrong here</p>
  
  <p>Option Explicit</p>
  
  <pre><code>Dim Root
  
  Set objXMLDoc = CreateObject("Microsoft.XMLDOM") 
  objXMLDoc.async = False 
  objXMLDoc.load("C:\test\combineXML.xml")    
  Set Root = objXMLDoc.documentElement 
  WScript.Echo Root
  Set NodeList = Root.getElementsByTagName("common")     
  For Each Elem In NodeList 
  WScript.Echo Elem.text
  
  Next
  </code></pre>