DataSet load a XML string in the memory

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

If I have a XML file, I can use ReadXml to load the file into DataSet.
But if I have the whole XML string in memory, how to load this string
into a new DataSet?

Bill
 
If I have a XML file, I can use ReadXml to load the file into DataSet.
But if I have the whole XML string in memory, how to load this string
into a new DataSet?

The ReadXml method has an overload that accepts a TextReader. Construct
a new StringReader instance by passing your XML string and then pass the
StringReader to ReadXml.
 
Back
Top