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.
<common>
<com name="Test1.css">
<file name="Tech.css">
<file name="Comp.css">
</com>
<com name="Test2.css">
<file name="HR.css">
<file name="HR2.css">
</com>
</common>
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
Option Explicit
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