<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>XML</title><link>http://www.michaelfalconer.co.uk/category/10.aspx</link><description>XML</description><managingEditor>Michael Falconer</managingEditor><dc:language>en-GB</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Michael D. Falconer</dc:creator><title>Efficient Techniques for Modifying Large XML Files</title><link>http://www.michaelfalconer.co.uk/archive/2004/05/11/149.aspx</link><pubDate>Tue, 11 May 2004 12:28:00 GMT</pubDate><guid>http://www.michaelfalconer.co.uk/archive/2004/05/11/149.aspx</guid><description>&lt;P&gt;I'm writing an XmlEventLog class at the moment, to provide smiilar functionality to the EventLog class in situations it may not be available (i.e. shared hosting environments). One of aspects of it that concerned me was writing to the xml without having to load the document into memory each time. If the log file grew quite large, this would obviously consume memory and take progressively longer.&lt;/P&gt;
&lt;P&gt;I started to look into alternative ways to write to the Xml file other than load into into an XmlDocument, add the new node and then save it back to disk.&lt;/P&gt;
&lt;P&gt;Thankfully I found&amp;nbsp;an article titled&amp;nbsp;&lt;A href="http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnxmlnet/html/largexml.asp" target=_blank&gt;Efficient Techniques for Modifying Large XML Files&lt;/A&gt;&amp;nbsp;on &lt;A title="Microsoft Developer Network" href="http://msdn.microsoft.com" target=_blank&gt;MSDN&lt;/A&gt;, and it had the perfect answer - separate out the log entries into a new file, and then link to it from the main XML file. It works a treat! I now open the separate log entry file as a text file, and append the new node to the end of it.&lt;/P&gt;
&lt;P&gt;So, now I've no excuse for not finishing my code, and releasing it! Watch for it soon...&lt;/P&gt;&lt;img src ="http://www.michaelfalconer.co.uk/aggbug/149.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>