I need to bind a dropdown list control to some data from an XML document. Initially, I tried to specify the DataSource as a node list and the DataText & DataValue properties to “@attribute_name”. No luck.
Thanks to the internet, I found the ASP.NET DropDownList XML Binder Class from the XML for ASP.Net site. This class is written to read an XML file from the specified path and create the ListItems that are added to the control. It's not databinding in the same sense as ASP.Net, but it works!
The class uses an XMLTextReader. Since I already have a document, I can use the XMLNodeReader and I'm done.