I'm trying to select a single node in an xml file using VBscript using the following code
Set node = xmlDoc.selectingSingleNode(".//node()[@name = 'anything']")
This works perfectly if I write what I need to pass as a text.
But I need to pass this 'anything'
as a variable X
I tried the following but neither is working
xmlDoc.selectingSingleNode(".//node()[@name = X]")
xmlDoc.selectingSingleNode(".//node()[@name = '&X&']")
Any suggestions are appreciated
Just concatenate properly:
>> X = "abc"
>> WScript.Echo ".//node()[@name = '" & X & "']"
>>
.//node()[@name = 'abc']