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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top