How to Convert XML to DataSet in C#

private DataSet XmlString2DataSet(string xmlString)
//create a new DataSet that will hold our values
DataSet quoteDataSet = null;
//check if the xmlString is not blank
if (String.IsNullOrEmpty(xmlString)) {
//stop the processing
return quoteDataSet;
//create a StringReader object to read our xml string
using (StringReader stringReader = new StringReader(xmlString))
//initialize our DataSet
quoteDataSet = new DataSet();
//load the StringReader to our DataSet
//return null
quoteDataSet = null;
//return the DataSet containing the stock information
return quoteDataSet;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s