I am trying to fill a combo (drop-down) box based on a XML 'data island' in my ASP page. All the examples that I find use an XML format where all the fields of the record are seperate elements in the data island, but I am pulling this recordset from SQL2000 with the "...FOR XML" suffix statement which creates an element for each record and all the fields are attributes of the element. Using this data-island I am able to fill a table with the data on the page, but now I need to use that same data island to fill a combo box's option list. I can't find any example or documentation that addresses this. The code I am trying is based off a purely elemental example and is not working.
Here is a sample of my XML recordset:
<root>
<pd_peopleview ID="1" lname="Smith"/>
<pd_peopleview ID="2" lname="Jones"/>
...
</root>
I think what I need is a way to scroll through all the nodes and pull out the attribute values. Any ideas on how I can fill the combo box on my asp page?
Here is a sample of my XML recordset:
<root>
<pd_peopleview ID="1" lname="Smith"/>
<pd_peopleview ID="2" lname="Jones"/>
...
</root>
I think what I need is a way to scroll through all the nodes and pull out the attribute values. Any ideas on how I can fill the combo box on my asp page?