title: Cakephp generating xml error - blank space
body: <p>I am trying to generate a dynamic xml document in CakePHP to output to the browser.</p>
  
  <p>Here is my controller code:</p>
  
  <pre><code>Configure::write ('debug', 0);
  $this-&gt;layout = null;
  header('Content-type: text/xml');
  echo "&lt;?xml version=\"1.0\"?&gt;";
  </code></pre>
  
  <p>View is something like this:</p>
  
  <pre><code>&lt;abc&gt;
       something
  &lt;/abc&gt;
  </code></pre>
  
  <p>The output is probably as expected:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;&lt;abc&gt;something&lt;/abc&gt;
  </code></pre>
  
  <p>The only problem is that there is a space before <code>&lt;?xml</code> giving me an error:</p>
  
  <pre><code>XML Parsing Error: XML or text declaration not at start of entity
  Line Number 1, Column 2:
   &lt;?xml version="1.0"?&gt;&lt;abc&gt; something &lt;/abc&gt;
  -^
  </code></pre>
  
  <p>I know this problem in PHP, when you have php-start and end tags it leaves a space and creates problems, so, I tried to move the line <code>echo "&lt;?xml ver...</code> to controller from the view to avoid that but it didn't help.</p>
  
  <p>Thanks in advance.
  -happyhardik</p>