[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Load all XML file elements into a dropdownlist

Posted on 2007-11-29
3
Medium Priority
?
918 Views
Last Modified: 2013-11-26
Hi,

I have a XML file that I want to load all the child elements into a Dropdownlist. Can I do that and how?

If there are more than one of the same child elements I only want to only show one.

Thanks
0
Comment
Question by:ALawrence007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
vbturbo earned 2000 total points
ID: 20376562
Hi this will read a xml file and only populate the atribute CustName into your combo

      Dim testing As New DataSet

        testing.ReadXml("C:\SomeFolder\SomeXMLfile.xml")
       MyCombo.DataSource = testing.Tables(0)
       MyCombo.DisplayMember = "CustName" 'The value to be shown in the list.
       MyCombo.ValueMember = "CustName" 'The value that will return the SelectedValue property of the currently
       selected item.  

vbturbo
0
 

Author Comment

by:ALawrence007
ID: 20382264
vbTurbo,

Thanks for that reply. I worked on this last night and keep on getting the following error:
Cannot add a SimpleContent column to a table containing element columns or nested relations

Any I deas?
0
 
LVL 18

Assisted Solution

by:vbturbo
vbturbo earned 2000 total points
ID: 20417907
Do you have any table relations in your dataset ?

testing.Relations.Clear()

else try paste some code

vbturbo
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question