Guest_imported
New member
- Jan 1, 1970
- 0
I need some help on this topic.
This is what I have tried so far
Won't work with the [@firstName = ""John""] part
the rest does.....
'*********************Code.vbs***************************
Dim DataSource,GetData,Row
Set DataSource = CreateObject("Microsoft.XMLDOM"
DataSource.async = False
DataSource.setProperty "SelectionLanguage", "XPath"
DataSource.load("DataSource.xml"
Set GetData = DataSource.documentElement.selectNodes("*/*[@firstName = ""John""]"
For Each Row In GetData
WScript.Echo Row.text
Next
'*************** DataSource.xml *********************
<?xml version="1.0" encoding="ISO-8859-1"?>
<addressBook>
<address>
<firstName>John</firstName>
<surname>Smith</surname>
<email>smithj@world.org</email>
<tel type = "work">234-123-222</tel>
</address>
</addressBook>
This is what I have tried so far
Won't work with the [@firstName = ""John""] part
the rest does.....
'*********************Code.vbs***************************
Dim DataSource,GetData,Row
Set DataSource = CreateObject("Microsoft.XMLDOM"
DataSource.async = False
DataSource.setProperty "SelectionLanguage", "XPath"
DataSource.load("DataSource.xml"
Set GetData = DataSource.documentElement.selectNodes("*/*[@firstName = ""John""]"
For Each Row In GetData
WScript.Echo Row.text
Next
'*************** DataSource.xml *********************
<?xml version="1.0" encoding="ISO-8859-1"?>
<addressBook>
<address>
<firstName>John</firstName>
<surname>Smith</surname>
<email>smithj@world.org</email>
<tel type = "work">234-123-222</tel>
</address>
</addressBook>