title: Magento Controller displaying big XML file causes odd rendering in Browser
body: <p>I am working on a relatively extensive but not huge XML file that is being delivered from a custom Module in Magento using a controller. Everything has been going well and I have been able to get it to work and add nodes with no issues. The browser (Chrome in this case) has been rendering the XML document fine and stylizing it as expected. In order to display the XML headers properly via Magento I am using the following code:</p>
  
  <pre><code>/* Set display to render output as an XML document */
  $this-&gt;loadLayout(false);
  $this-&gt;getResponse()-&gt;setHeader('Content-Type','text/xml');
  echo "&lt;Magento &gt;";
  .
  .
  .
  echo "&lt;/Magento&gt;\n";
  $this-&gt;renderLayout();
  </code></pre>
  
  <p>When the output reaches 140 nodes, it stops rendering as formatted XML and just shows the data as if it is being rendered as HTML and doesn't know the node definition. Example:</p>
  
  <p><img src="https://i.stack.imgur.com/A2NmT.png" alt="rendered incorrectly"></p>
  
  <p>If I comment a node out so there are 139 it will render properly. If I save the full 140+ node XML page as a file then drop that file into Chrome, it renders properly. For Example:</p>
  
  <p><img src="https://i.stack.imgur.com/7DsPA.png" alt="rendered correctly"></p>
  
  <p>If I run the 140+ node XML file through a validator it comes through as valid XML code. I also get the same result of a broken rendering display if I use Firefox instead to view the page. </p>
  
  <p>The question. Is there a limit as to how big an XML file can be to have it be delivered via a Magento Controller? If so, can I reset this limit to more than 139 nodes so this renders properly? Conversely, should I not worry about if the browser is rendering the page properly because it is going to be used by a different program and not a browser? </p>