Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: VB6 Go to Specific Node VB6 Go to Specific NodeTo: NULL Date: 5/2/2004 8:06:00 PM I have several command buttons, each with their own menu (popup). I use an
XML file to set the captions of the command buttons and their corresponding
menus. My XML file is arranged like this:
<places>
<section>
<!-- Command button properties-->
<name></name>
<description</description>
<!-- Menu properties -->
<menu></menu>
<menu></menu>
</section>
<!-- ...and more <sections> -->
</places>
Each button has it's own <section>. I loop through the nodes (for each)
Basically, I want my program to be able to determine what to do when the
user clicks a menu item based on keywords associated with each menu. Thus I
am thinking maybe each <menu> item has an attribute (correct name?)
associated with it, which is the keyword, so each menu item would be like
<menu function="openfile">.
My program can provide the command button's index, which is what number
<section> it got its contents from (ie. the first command button's caption
and corresponding menu would have been from the first <section> tree), and I
can supply the menu's index, (ie. if the user clicks the second item on the
popup menu then we know that it was from the first <menu> item of a
particular <section>.
I am thinking that I loop through a certain number of <section> items
according to the command button number pressed (ie. I press the first
command button so it goes to the first <section> tree). Then, under that
<section> tree, it reads the n'th <place> item's attribute - where n is the
number of the menu clicked (ie. if I click the third menu item, then the
third <place> attribute is read).
I hope I explained myself okay, I'm new to XML and it is kind of hard to
find VB6 XML info. Basically, the end question is, how to do I go to one
specific <section> tree (number is determined by the command button number
pressed) and then read a specific <place> attribute (number is determined by
menu item pressed).
Thanks in advance
Matthew Shaw
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
