473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ReadXML in memory

Please,

i've created a webservice that receives a XML string that i need to work as
a Dataset.

I've tryied the ReadXML method from the DataSet. First i write the XML
string at the disk and then read it, but i think it's another way to do this
in memory, using MemoryStream or other object.

No sucess.

Any idea as how i can do this?

tks in adv.

Fabiano
Nov 15 '05 #1
4 2108
Hi,

You can configure a TextReader or an XmlReader instance to read from a
memory stream, and then supply this instance to the appropriate ReadXML
overload.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Fabiano" <fa*****@fabiano.com> wrote in message
news:%2********************@tk2msftngp13.phx.gbl.. .
Please,

i've created a webservice that receives a XML string that i need to work as a Dataset.

I've tryied the ReadXML method from the DataSet. First i write the XML
string at the disk and then read it, but i think it's another way to do this in memory, using MemoryStream or other object.

No sucess.

Any idea as how i can do this?

tks in adv.

Fabiano


Nov 15 '05 #2
Ok,

but how to use the memorystream.... do you have any sample?

Tks

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com>
escreveu na mensagem news:ey******************@TK2MSFTNGP10.phx.gbl...
Hi,

You can configure a TextReader or an XmlReader instance to read from a
memory stream, and then supply this instance to the appropriate ReadXML
overload.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Fabiano" <fa*****@fabiano.com> wrote in message
news:%2********************@tk2msftngp13.phx.gbl.. .
Please,

i've created a webservice that receives a XML string that i need to work

as
a Dataset.

I've tryied the ReadXML method from the DataSet. First i write the XML
string at the disk and then read it, but i think it's another way to do

this
in memory, using MemoryStream or other object.

No sucess.

Any idea as how i can do this?

tks in adv.

Fabiano

Nov 15 '05 #3
what about XmlTextWriter?
in my books says:
" allows you write out XML to a stream,file or textWriter objects"
you can try write to a memory stream and then read the data in memory stream
using XmlTextReader.
after this, you call the ReadXml method of dataset.

hope it helps
[]´s
Lafayette

"Fabiano" <fa*****@fabiano.com> wrote in message
news:%2********************@tk2msftngp13.phx.gbl.. .
Please,

i've created a webservice that receives a XML string that i need to work as a Dataset.

I've tryied the ReadXML method from the DataSet. First i write the XML
string at the disk and then read it, but i think it's another way to do this in memory, using MemoryStream or other object.

No sucess.

Any idea as how i can do this?

tks in adv.

Fabiano

Nov 15 '05 #4
Fabiano <fa*****@fabiano.com> wrote:
but how to use the memorystream.... do you have any sample?


You shouldn't need to convert into a MemoryStream at all - why bother
going to binary and back again? Just use a StringReader (which derives
from TextReader).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
2
by: Walt | last post by:
I have a small xml document that I bring into my application by reading the xml file with a dataset: Dim ds As New DataSet ds.ReadXml(fileName) ' Do some work with the tables in the dataset...
2
by: C Glenn | last post by:
I'm attempting to use ReadXml. It's working in that I end up with some data in the DataSet. But I'm not able to deal with it effectively after that. The XML file is properly formatted in that it...
2
by: Jason Huang | last post by:
Hi, In my C# Windows Form project, I'm testing comparing using the SqlClient with the ReadXML method. The ReadXML method will read 2 .xml files, one is 4K, the other one is 3Mb, both are on my...
2
by: joey.powell | last post by:
Hello guys, I have a pretty simple app that reads XML data (.ReadXML) into an in-memory dataset, runs some linq queries, mods the data, and then writes the XML (.WriteXML) back to disk. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.