B
Brad
I am trying to convert an XML Stream received from a web api call into
a DataSet to use in the rest of the app. The issue I am running into
is that it will not convert the stream to a dataset and halts the
program.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
WebClient client = new WebClient();
string url="<url of the api>";
Stream data = client.OpenRead(url);
StreamReader reader = new StreamReader(data);
DataSet ds = new DataSet();
ds.ReadXml(data); //This is where the program fails.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I am using Framework 1.1 still (if that helps.)
a DataSet to use in the rest of the app. The issue I am running into
is that it will not convert the stream to a dataset and halts the
program.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
WebClient client = new WebClient();
string url="<url of the api>";
Stream data = client.OpenRead(url);
StreamReader reader = new StreamReader(data);
DataSet ds = new DataSet();
ds.ReadXml(data); //This is where the program fails.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I am using Framework 1.1 still (if that helps.)