Although this may be a very simple thing to do, I am having great difficulty
creating a stream from a string variable. In my vb.net CF (WinCE)
application, I have a string variable containing an XML document that I want
to load into a dataset. I see that there was a previous post related to this
("Read a dataset from a stream"), and I've tried to follow these
instructions, but to no avail. I've also tried cheating and just reading the
string directly into the XMLTextReader, but that throws an exception as well
(System.ArgumentException).
I can't seem to find the right implementation of the Stream class that will
read my string variable. I would appreciate it if anyone could tell me how to
load my string variable into the appropriate Stream object so that it can be
read by the XMLTextReader, which in turn will be passed to the
DataSet.readXML(XMLReader reader), as per the previous post I mentioned.
Thanks very much in advance.
Peter
--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/
"Joseph Rea, Accord Software"
<JosephReaAc...@discussions.microsoft.com> wrote in message
news:122B8D77-917C-4D15...@microsoft.com...
ds.ReadXml(new XmlTextReader(new StringReader(myStringWithXml)));
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
> Thread-Topic: Create a stream from a string variable
> thread-index: AcUpn0+SMhBEn8hnTyGIThFT7biSBQ==
> X-WBNR-Posting-Host: 209.112.24.236
> From: =?Utf-8?B?Sm9zZXBoIFJlYSwgQWNjb3JkIFNvZnR3YXJl?=
<JosephReaAc...@discussions.microsoft.com>
> Subject: Create a stream from a string variable
> Date: Tue, 15 Mar 2005 12:41:06 -0800
> Lines: 18
> Message-ID: <122B8D77-917C-4D15...@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.dotnet.framework.compactframework
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA
03.phx.gbl
> Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.compactframework:73294
> X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
"snatchblaster" <snatch...@discussions.microsoft.com> wrote in message
news:BAA0F67F-31D1-429E...@microsoft.com...
Post the working and failing code.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
"snatchblaster" <snatch...@discussions.microsoft.com> wrote in message
news:E5A31933-C498-4095...@microsoft.com...