title: Load xml file in php and CodeIgniter
body: <p>I'm trying to use the XML DOM in CodeIgniter, but I can't load the xml document. I'm not sure I understand CodeIgniter well enough yet, but I guess there's some problem with how I write the path to the file:</p>
  
  <pre><code>$xmlDoc = new DOMDocument();
  $xmlDoc-&gt;load('filter.xml');
  </code></pre>
  
  <p>The file is located in the same directory as the calling file. But this doesn't work. I have also tried variations of the path like this: </p>
  
  <p>'/application/models/filter.xml'
  base_url().'/application/models/filter.xml'
  base_url().'application/models/filter.xml'</p>
  
  <p>But nothing works. Could someone please explain how these relative paths should work, and what I need to do instead to be able to load the xml document?</p>