Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > how to write some xml into huge xml file into speceific location???

Reply
Thread Tools

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

 
 
Xenia
Guest
Posts: n/a
 
      11-23-2003
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.


 
Reply With Quote
 
 
 
 
Oleg Tkachenko
Guest
Posts: n/a
 
      11-24-2003
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

 
Reply With Quote
 
 
 
 
Xenia
Guest
Posts: n/a
 
      11-24-2003
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.


 
Reply With Quote
 
GIMME
Guest
Posts: n/a
 
      11-24-2003
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" <(E-Mail Removed)> wrote in message news:<bpr1ud$1rjhlj$(E-Mail Removed)-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.

 
Reply With Quote
 
Xenia
Guest
Posts: n/a
 
      11-25-2003
by "speceific" i meant something that defined through XPath.


"GIMME" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to split huge file located on nfs using some system call. krunalb C++ 4 09-08-2009 11:22 AM
Memory error due to the huge/huge input file size tejsupra@gmail.com Python 3 11-20-2008 07:21 PM
How to split a huge zip file into multiple volumes with the smallersize each? DD Java 3 11-28-2007 12:28 PM
How to read and write huge binary files Lad Python 3 01-19-2007 08:42 AM
Update huge xml files without loading into RAM Christian Hiller Java 7 10-09-2003 06:03 PM



Advertisments