473,394 Members | 1,765 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,394 software developers and data experts.

Data Access Advice

Ben
Hi

I need to post xml data to a url, I have have created an xml file using an
xml text writer as below but would rather a faster method that does not
involve writing the file to disk but using it from memory instead. Could
anyone suggest a method that is similar in coding (so as not to require too
many code changes).

Dim writer As New System.Xml.XmlTextWriter("c:\temp\TestXml.xml",
System.Text.Encoding.UTF8)

..Formatting = Xml.Formatting.Indented

..Indentation = 1

..IndentChar = ControlChars.Tab

..WriteStartDocument()

..WriteStartElement("........

Thanks
B
Sep 26 '06 #1
2 859

"Ben" <Be*@Newsgroups.microsoft.comwrote in message
news:uc*************@TK2MSFTNGP06.phx.gbl...
Hi

I need to post xml data to a url, I have have created an xml file using an
xml text writer as below but would rather a faster method that does not
involve writing the file to disk but using it from memory instead. Could
anyone suggest a method that is similar in coding (so as not to require
too many code changes).

Dim writer As New System.Xml.XmlTextWriter("c:\temp\TestXml.xml",
System.Text.Encoding.UTF8)

.Formatting = Xml.Formatting.Indented

.Indentation = 1

.IndentChar = ControlChars.Tab

.WriteStartDocument()

.WriteStartElement("........

Thanks
B

Sep 27 '06 #2
Instead of backing your XmlTextWriter with a disk file, back it with some
form of Stream object.

I tend to use a StringWriter.

"""ONE""" way of using it could be:

Dim _sw As New StringWriter

Dim writer As New System.Xml.XmlTextWriter(_sw, System.Text.Encoding.UTF8)

... Do your stuff here

_sw.Close

... Post the result of _sw.ToString to the url.
"Ben" <Be*@Newsgroups.microsoft.comwrote in message
news:uc*************@TK2MSFTNGP06.phx.gbl...
Hi

I need to post xml data to a url, I have have created an xml file using an
xml text writer as below but would rather a faster method that does not
involve writing the file to disk but using it from memory instead. Could
anyone suggest a method that is similar in coding (so as not to require
too many code changes).

Dim writer As New System.Xml.XmlTextWriter("c:\temp\TestXml.xml",
System.Text.Encoding.UTF8)

.Formatting = Xml.Formatting.Indented

.Indentation = 1

.IndentChar = ControlChars.Tab

.WriteStartDocument()

.WriteStartElement("........

Thanks
B

Sep 27 '06 #3

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

Similar topics

5
by: Simon Harvey | last post by:
Hi everyone, I'm hoping for a little bit of advice on the following. I am in the process of making a small application that can send, receive and store email messages. The current area that I am...
3
by: Alex | last post by:
Hi all, I'm looking for some advice on how best to implement storage of access logs into a db/2 8.1.4 database running on a RH 7.2 system. I have 5 (squid) web caches running here that...
4
by: Jeff Smith | last post by:
Hi Is there a way to do partial replication of data? I'm looking at having a central back end data file which contains all the data from all users. But when each user synchronises the mobile...
4
by: Heath Kelly | last post by:
I need advice on correct usage of ADO.NET in an ASP.Net environment. I have an ASP.Net application that accesses data through a referenced class library. Things start to break down when multiple...
5
by: Natan | last post by:
I want to create an n-tier app and I would like an advice of you that know more than me about this. I want my app to support multiple databases in the way that when a client wants to use Oracle...
3
by: Sigmathaar | last post by:
Hi, I'm need some advice about lists and vectors. I'm doing a program who needs to have sequential access of a non ordered unit of objects whose size decreases almost each time the sequence is...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
7
by: freeskier | last post by:
Hello, I am looking for some advice on collecting data. We are working on collecting about 20 different data points from 60 initial people, later to be expanded to approximately 200. At present we...
6
by: Senthil | last post by:
Hi All We are having a VB application on SQL. But we need to collect information from persons who will be offline to verify data and insert new data. Generally they will be entering the data in...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.