public static DataSet LoadXMLDataToDataSet(string xmlString)
{
//creating a new DataSet
DataSet ds = null;
//check if the xmlString is not blank
if (String.IsNullOrEmpty(xmlString))
{
//stop the processing
return ds;
}
try
{
//create a StringReader object to read xml string
using (StringReader stringReader = new StringReader(xmlString))
{
//initializing DataSet
ds= new DataSet();
//load the StringReader to our DataSet
ds.ReadXml(stringReader);
}
}
catch (Exception ex)
{
//return null
ds= null;
throw ex;
}
return ds;
}