473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2081

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

Similar topics

0
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
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
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
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
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
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
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
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
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...

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.