Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using loops to navigate through trees

Status
Not open for further replies.

ryan101

Programmer
Jul 11, 2001
13
US
I need to call multiple trees in an xml document.

set branch1 = tree.item(0).childNodes
set branch2 = tree.item(1).childNodes
...etc...
This works just fine.
But what I need is to have a loop that does something like this.

for x = 0 to something.length
set branch = tree.item(x).childNodes
do something with branch
next

I've tried doing the following:
set branch = eval("tree.item(" & x & ")childNodes")
eval("set branch = tree.item(" & x & ")childNodes")
execute("set branch = tree.item(" & x & ")childNodes")

none of those seemed to work. Any ideas would be appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top