title: Output XML file | API with CodeIgniter
body: <p>I am developing a API with CodeIgniter Framework.</p>
  
  <p><strong>Scenario</strong> -</p>
  
  <ol>
  <li>My application will call my API with <a href="http://myapi.com/controler?parA=valA&amp;parB=valB" rel="nofollow">http://myapi.com/controler?parA=valA&amp;parB=valB</a></li>
  <li>My controller will _GET the request and process it.</li>
  <li>Controller will call a view with <code>$this-&gt;load-&gt;view('response',$data, true)</code>.</li>
  </ol>
  
  <p><strong>My View File</strong> - </p>
  
  <p>Response.php</p>
  
  <pre><code>&lt;response&gt;
      &lt;status&gt;
          200
      &lt;/status&gt;
      &lt;mode&gt;
          VisaCreditCard
      &lt;/mode&gt;
      &lt;options&gt;
          &lt;option name="Transfer" url="http://myapi.com/controller/transfer?id=8230&amp;reason=illness" /&gt;
          &lt;option name="Cancel" url="http://myapi.com/controller/cancel?id=3934"/&gt;
          &lt;option name="New Booking" url="http://myapi.com/controller/book_new" /&gt;
      &lt;/options&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>Please note that the tag names are the same as I am using in my application although the values inside are vague. This is because I want you to notice the <code>&lt;options&gt;</code> and <code>&lt;option/&gt;</code>. </p>
  
  <p><strong>Problem</strong></p>
  
  <p>Now the problem is when I call my API, CI would do all its jobs and then give out this view where all i get on screen is</p>
  
  <pre><code>200 VisaCreditCard
  </code></pre>
  
  <p>When I check to see the Source Code of the page I get exactly what I want i.e the text that I have in my respons.php file
  <strong>Expectation</strong>
  I want the source code I got in my output to be on the visible to when I call that url.</p>
  
  <hr>
  
  <p><strong>Server Information</strong></p>
  
  <ul>
  <li><p>Ubuntu 13.04</p></li>
  <li><p>Apache2</p></li>
  <li><p>PHP 5</p></li>
  <li><p>Codeigniter 2.1.3  (Rewrite PHP Short Tags - FALSE &amp;  .htaccess to omit index.php)</p></li>
  </ul>
  
  <hr>