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