vbscript & selectSingleNode() - XPATH query not getting desired results
Posted on 2004-09-16
This question is urgent but probably not difficult.
I need someone to give me the correct syntax for my xpath query.
Basically I want to grab the <desired> node and its associated attributes. Since it is at the root level in vbscript I tried to get it with:
set node = objXmlDoc.documentElement.selectSingleNode("//desired")
* I also tried leaving the syntax("//") inside the selectSingleNode but I kept getting back nothing.
after googling xpath I came across something that led me to beleive I may not be able to access the <desired> node because of its position. If this is true I would then move <desired> inside element :<element><desired name= etc/></element> I also tried a similar xpath query for that("//element/desired") but I kept getting an error.
Can anyone show me an vbscript selectSingleNode call with valid xpath syntax that would get my desired nodes?
<desired name="bob" computername="winbox"/>