title: XSLT transformation on Large XML files with C#
body: <p>I have some very large XML files (800 MB to 1.5 GB). I need to apply XSLT on that. I am able to read it XMLTextReader. When i applied XSLT transformation, get SystemOutOfMemory Exception.</p>
  
  <p>My code looks like;</p>
  
  <pre><code>static void Main(string[] args)
  {
      XDocument newTree = new XDocument();
      XmlTextReader oReader = new XmlTextReader(@"C:\Projects\myxml.xml");
  
  
      using (XmlWriter writer = newTree.CreateWriter())
      {
          XslCompiledTransform oTransform = new XslCompiledTransform();
          oTransform.Load(@"C:\Projects\myXSLT.xsl");
          oTransform.Transform(oReader, writer);
      }
      Console.WriteLine(newTree);
  }
  </code></pre>
  
  <p>Thanks in advance. It is very urgent. If I don't get any solution, I need to split XML into smaller XML and do transformation.</p>