DataSet Read XML from string

M

Maziar Aflatoun

Hi,

I have ds.ReadXml(myXML); which reads an XML file into my DataSet. How can
I read my XML from a string instead of a file? Can someone please provide me
with a sample?

Thanks
Maz
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

You can use the ReadXml( TextReader ) and initializate the TextReader with
yout string:

ds.ReadXml( new TextReader( yourstring), ... );


cheers,
 

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

Top