Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-23-2006, 04:56 PM
Albert Albert is online now
Registered User
 
Join Date: 08-18-2006
Posts: 9
//element[@attribute] in vbscript

I'm trying to write a script that executes an xpath query that contains square brackets but I keep getting errors. The script works when tested in a .vbs file.

I think it has something to do with the [] brackets. I tried using the literal syntax using double brackets but it still produces an error. Is there any way to write this to get it to work in Visual Build Pro?

1st example:
Set doc = CreateObject("MSXML.DOMDocument")
doc.load(myfile.xml)
myXpath = "//element[@attribute]"
Set nodes = doc.selectNodes(myXpath)

2nd example:
myXpath = "//element[[@attribute]]"

Thank You!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 02:35 AM.


Copyright © 1999-2023 Kinook Software, Inc.