Is there a way to stream Linq to XML as you build a document?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
We are creating quite large XML files using Linq to XML which contain Base 64 encoded entries therefore quite large. I do not need to do any parsing, its a straight add of elements to an XDocument (Or XElement) however this makes our Windows Service exponentially
increase in memory causing some issue. At the end, we write the file out to disk anyway so is there a way to do this in a streaming fashion that minimises the memory footprint of the windows service?
Any help gratefully received
Mike

View the full article
 
Back
Top