473,486 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XMLNodeList to DataTable or DropDownList

Is there a way to load a Dataset or a Datatable with a nodelist, using an
instruction? I have a document like this:

<ProductSalesData>
<Lists>
<List Name = "ProductType">
<ListItem Value = "0" Text = "All" />
<ListItem Value = "1" Text = "Product 1" />
<ListItem Value = "1" Text = "Product N" />

I get the node list, using this path:
/ProductSalesData/Lists/List[@Name='ProductType']

Now, I need to put that nodelist in a table, or assign it to a DropDownlist.

Thank you,

Frank.

Note:
When I assign the NodeList as the DataSource for the dropdownlist, I don't
know how to speciy the DataTextField and DataValueField properties. I'm
currently using a table, but I fill that table by iterating through the
nodelist with a foreach.

Thanks again.
Nov 12 '05 #1
0 2084

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
626
by: John Francisco Williams | last post by:
Is there a way to load a Dataset or a Datatable with a nodelist, using an instruction? I have a document like this: <ProductSalesData> <Lists> <List Name = "ProductType"> <ListItem Value = "0"...
1
2959
by: Mike | last post by:
I have an ASP.NET/VB app that updates values in a DataTable over the course of about 3 different pages. On the way out of the first of these pages, I explicitly build the DataTable from values in...
1
2219
by: Mike Bridge | last post by:
I'm getting a nonsensical error when binding a DataTable with one row to a DropDownList. The DataTable's row contains the fields "id" (INT), "description" (VARCHAR) and with a couple other...
1
6774
by: Luis Esteban Valencia | last post by:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source...
0
1495
by: Matthew.DelVecchio | last post by:
hello, i am attempting to do some databinding of an XmlNodeList to a DropDownList. id like to avoid looping thru my nodelist and hoped to do a simple .DataSource/.DataBind technique. for...
4
4597
by: SkyHook | last post by:
1. Under the topic "Select Nodes Using XPath Navigation" it says: "All XmlNodeList objects are synchronized with the underlying document, therefore if you ... modify the value of a node, that node...
0
1031
by: Carlos | last post by:
Hi all, I have a hyperlink pointing to a page that contains a dropdownlist. This dropdown is loaded using a datatable when the page is loaded. However, I would like the hyperlink to point to the...
1
4766
by: Ramakrishna Pillai | last post by:
Hi all I have an XMLNodeList object which has the collection of xml nodes based on the search criteria with the help of XPath expression Now, how do I create a datatable with that so as to...
1
3247
by: gomathinayagam | last post by:
hai, am only beginer in c#... i am trying to connect database with webform. using a technique that the fields of the table and the controls in a form are named same...then i try get the controls...
3
2520
by: itboy1 | last post by:
hii i m making a page where i have used Dropdownlist and in that i have put 2 drop down list (1) Year( 2)month so in datatable i want a liek if u have 1 year and 3 month . i want it like that...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.