XML to ddl or to a DataTable.. HELP

eLeCTiTY

New member
XML to ddl or to a DataTable.. HELP

whats the best way to populate a drop down list from an XML string? I figured out that except giving the ddl a dataset as a dataSource Its easier to bind a datatable into a ddl. but how do I populate a DataTable from an XML string I have??? thank you for your time...
 

Zeliran

New member
המממ...

DataTable? לא בטוח, אבל מה שכן אתה יכול לקרוא XML לתוך DataSet ומשם ואלי להעביר את זה ל DataTable, אולי עקום עד כמה שיהיה.. כאמור ייתכן מאוד שיש פתרון אחר.. ו..אתה יכול ליישר בפעם הבאה את הטקסט לשמאל? תודה
 

eLeCTiTY

New member
Solution

Found a solution.. (and here's the text in the left side) I had a string with an XML, so what I had to do is to deckare a StringReader, that gets the XML string. Later on, as said, a DataSet gets this string reader. The problem I had is that the dataSet can't take a string for the ReadXML method, while the StringReader iherits the same as Stream (IO), ehich is acceptable by the ReadXML. So the DataSet can get the stringreader instance as it would read the stream. :) Thanks for the help. Good day.
 
למעלה