borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Display pictures  on Forms in VB.NET)Next Topic (Form Show?) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : Add XML Elemens to a ComboBox
Poster Message
tureypr
Level: Guest


icon Add XML Elemens to a ComboBox

Hi, I'm Been trying to add items to a combobox from a XML file ,could somebody help me?

I want to add parents elements in a combobox
and when you select a parents element the child elments appears in a second combobox,

I'm Stuck.........

16-06-2004 at 02:01 PM
| Quote Reply
johnedw
Level: Sage

Registered: 15-08-2004
Posts: 50
icon Re: Add XML Elemens to a ComboBox

I don't use Microsoft XML Parser doh lol.. it's probley not that much harder, but I like chilkatxml..


1.) Have a global variable called RootNode
2.) Fill the first combobox with the children of the root
node using the tag of each child.
3.) Then on change event for first combobox, you would
fill in the children of the selected item to the second combobox.

... for beyond this it involves a bit more logic but
very similiar.

____________________________
Today is a new day, in
a world OF CODE!

15-08-2004 at 01:57 AM
View Profile Send Email to User Show All Posts ICQ | Quote Reply
johnedw
Level: Sage

Registered: 15-08-2004
Posts: 50
icon Re: Add XML Elemens to a ComboBox

SelectedIndexChanged is the event for the combobox where you can dynamically add code to up and down the treebranches of the xmlfile.

I told you to create a global rootnode variable, but you probley will need more then that.

Rootnode is used to enumerate the first parents(children of root tag really) to get the tags and add them to the combobox...

You should have another object that holds the childnode

<John>
<Items>
   <Item1>
   </Item1>
</Items>
<Settings>
   <Setting1>
   </Setting1>
</Settings>
</John>

You would get Items and Settings for the tagnames of the root tag John.




____________________________
Today is a new day, in
a world OF CODE!

15-08-2004 at 02:02 AM
View Profile Send Email to User Show All Posts ICQ | Quote Reply
AndreaVB Forum : VB.Net : Add XML Elemens to a ComboBox
Previous Topic (Display pictures  on Forms in VB.NET)Next Topic (Form Show?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder