XMLNodeList to DataTable or DropDownList

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Francisco Williams

    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:

    <ProductSalesDa ta>
    <Lists>
    <List Name = "ProductTyp e">
    <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:
    /ProductSalesDat a/Lists/List[@Name='ProductT ype']

    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.


Working...