How to bind XML data to RadioButtonList using XmlDocument?

mdigitale

New Member
I'm stumped here. I've dynamically created RadioButtonLists before using data from a database, but not from XML. I'm not sure if I'm suppose to use the same method, but what I have so far isn't working. Here's what I have (stAddress is the value I'm getting from the user):\[code\]XmlDocument xAddress = new XmlDocument();xAddress.Load("http://myxmlservice/geocode?address=" + stAddress);XmlNodeList xNodeList = xAddress.DocumentElement.SelectNodes("response");XmlNode address = xNodeList.Item(0).SelectSingleNode("address");XmlNode latlong = xNodeList.Item(0).SelectSingleNode("latlng");rbMultiAdd.DataSource = xNodeList;rbMultiAdd.DataTextField = address.InnerText;rbMultiAdd.DataValueField = latlong.InnerText;rbMultiAdd.DataBind();\[/code\]I keep getting an error on the DataBind() = "DataBinding: 'System.Xml.XmlElement' does not contain a property with the name '330 S Valley View Blvd'."330 S Valley View Blvd is one of the results from my XML data.Is there another way I should be doing this since the data is XML?Thank you for any assistance.
 
Back
Top