How to modify my class in order to build large XML
files? I try to use XmlTextWriter
, but I don't know how to use it with XDocument
. I'd like to write each newElement
, then dispose it (in order to free RAM). Is there any possibility to do that? I know that I can use XmlTextWriter
built-in methods to do this, but I don't want to resign from using LINQ
...
Here's my class: http://pastebin.com/p6VfpBFg