Vbscript / Text Processing / Read Xml File
Get attributes from an XML file.
e.g. <node1 attribute1="value1" attribute2="value2">
Set xmlDoc=CreateObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("c:\DCCUResults.xml")
For Each x in xmlDoc.documentElement.childNodes
For Each y in x.childNodes
strName = y.getattribute("name") strVal = y.getattribute("value")
If strName = "ServiceTag" Then
Wscript.Echo strName & strVal
End If
Next Next
Please note that a disclaimer applies to any code on this page.
|