how to get dataset from xml in .net

public static DataSet GetDataSet(this string xmlString)
{
DataSet set = new DataSet();
try
{
StringReader input = new StringReader(xmlString);
XmlTextReader reader = new XmlTextReader(input);
set.ReadXml(reader);
}
catch (Exception)
{
set = null;
}
return set;
}

 

 

SHARE THIS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.