G
Guest
What i need to do is read an xml string into a new dataset. In the full
framework, this is simply:
System.IO.StringReader sr = new System.IO.StringReader(xml);
DataSet ds = new DataSet();
ds.ReadXml(sr);
However, in the CF, the DataSet.ReadXml method wants an XmlTextReader, or a
filename, and i can't get either to work.
I have tried:
System.IO.StringReader sr = new System.IO.StringReader(xml);
DataSet ds = new DataSet();
XmlTextReader xmlr = new XmlTextReader( sr );
ds.ReadXmlSchema( xmlr );
ds.ReadXml( xmlr );
But get an XmlException on the ReadXmlSchema call.
The only examples i've found online so far involve reading the xml in from a
file.
Can anyone offer any suggestions?
Thanks.
framework, this is simply:
System.IO.StringReader sr = new System.IO.StringReader(xml);
DataSet ds = new DataSet();
ds.ReadXml(sr);
However, in the CF, the DataSet.ReadXml method wants an XmlTextReader, or a
filename, and i can't get either to work.
I have tried:
System.IO.StringReader sr = new System.IO.StringReader(xml);
DataSet ds = new DataSet();
XmlTextReader xmlr = new XmlTextReader( sr );
ds.ReadXmlSchema( xmlr );
ds.ReadXml( xmlr );
But get an XmlException on the ReadXmlSchema call.
The only examples i've found online so far involve reading the xml in from a
file.
Can anyone offer any suggestions?
Thanks.