473,324 Members | 2,473 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,324 software developers and data experts.

how to write some xml into huge xml file into speceific location???

Hello!

Is anyone can help me to figure out how to write some xml into huge xml file
into speceific location???

Say, i have a file about 139 Mb and i need to write some data (xml) into it,
but in speceific location (specified by XPath for example). i have tryed
used MSXML dom for it, but its eats memory like a twice bigger then my file.
Is any way to do that without that hurt?

thank you,
Xenia.
Jul 20 '05 #1
4 2343
Xenia wrote:
Is anyone can help me to figure out how to write some xml into huge xml file
into speceific location???

Say, i have a file about 139 Mb and i need to write some data (xml) into it,
but in speceific location (specified by XPath for example). i have tryed
used MSXML dom for it, but its eats memory like a twice bigger then my file.
Is any way to do that without that hurt?

It's really one of the worst scenarios when working with XML. Correct me
if I'm wrong, I don't see any generic efficient solution. The problem is
that to be able to identify update location by XPath expression you have
to have XML in XPath navigable form, say DOM or XPathDocument in .NET.
In .NET it's possible actually to build XPathNavigator over XmlReader,
but that would limit XPath to forward-only subset and as your task is
not only to query data, but to update and save it back, it requires more
work. It's my idee fixe to implement such beast, hope I'll have time for
that.

You can try also to escape to regexp. That's not really robust nor safe,
but anyway.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

Jul 20 '05 #2
Yes, true. Well, i thought to use DataSet on a first place, but not yet
tryed it, because a bit confused with how the .NET DataSet will able to
workout trees of data with different structure, i mean that data dont have
common looks format as tables in normal DBs... Is DataSets can be useful for
this case?

Xenia.
Jul 20 '05 #3
The trick is not to write the XML file in one swoop but to write
it incrementally.

It's not clear what you mean by specific? Specific as in write to a
specific file?

"Xenia" <cy***************@yahoo.com> wrote in message news:<bp*************@ID-200687.news.uni-berlin.de>...
Hello!

Is anyone can help me to figure out how to write some xml into huge xml file
into speceific location???

Say, i have a file about 139 Mb and i need to write some data (xml) into it,
but in speceific location (specified by XPath for example). i have tryed
used MSXML dom for it, but its eats memory like a twice bigger then my file.
Is any way to do that without that hurt?

thank you,
Xenia.

Jul 20 '05 #4
by "speceific" i meant something that defined through XPath.
"GIMME" <gi*******************@yahoo.com> wrote in message
news:3f**************************@posting.google.c om...
The trick is not to write the XML file in one swoop but to write
it incrementally.

It's not clear what you mean by specific? Specific as in write to a
specific file?

Jul 20 '05 #5

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

Similar topics

1
by: Ellixis | last post by:
Hello, How can I use fwrite() and fseek() in order to write data in the middle (or anywhere else) of a file without overwriting existing data ? People told me that I should load the file into...
2
by: Zam | last post by:
Hello World, Under Windows 2003 Server. IIS6. The following code working fine for small files, and for files with size about few megabytes. If I am trying to send HUGE file -- about 700...
4
by: Xenia | last post by:
Hello! Is anyone can help me to figure out how to write some xml into huge xml file into speceific location??? Say, i have a file about 139 Mb and i need to write some data (xml) into it, but...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
5
by: philip | last post by:
Here is some lines of code than I wrote. You can copy/paste theis code as code of form1 in a new project. My problem is this one : I try to write in a file a serie of bytes. BUT some bytes...
2
by: bballr | last post by:
I have a problem that I'm not sure if it can be done. I'm trying to use the MySQL C API to be able to use a normal sql insert statement that will send the data or file to a directory and NOT the...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
3
by: Lad | last post by:
What is a good way to read binary data from HUGE file and write it to another file? Thanks for help La.
1
by: Sachin Garg | last post by:
I have a program which opens a fstream in binary input+output mode, creating the file if it doesn't exists. But writing doesn't works after reading, it must be something obvious that I am not aware...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.