title: How to read file in Rails style
body: <p>I have some data stored as an XML file. I put it into a directory I've created, <code>app/data/myxml.xml</code>.</p>
  
  <p>Now I want to parse it using Nokogiri. To locate the file I am referencing an absolute path:</p>
  
  <pre><code>@doc = Nokogiri::XML(open("/home/me/webA/myrailsproject/app/data/myxml.xml"))
  </code></pre>
  
  <p>The absolute path definitely make the code ugly. Is there a shorter, cleaner way to reference the file? Such as:</p>
  
  <pre><code>@doc = Nokogiri::XML(open("myxml"))
  </code></pre>