title: The document "doc.xml" does not have a valid root (REXML::ParseException)
body: <p>I'm trying to convert an XML document into a Ruby hash for the first time, and having no success. I have my XML document, <code>doc.xml</code>, in a folder along with my script <code>hashrunner.rb</code>. </p>
  
  <p>In <code>hashrunner.rb</code>:</p>
  
  <pre><code>require 'active_support/core_ext/hash'
  hash = Hash.from_xml("doc.xml")
  puts hash
  </code></pre>
  
  <p>The first line of the XML document is <code>&lt;?xml version="1.0" encoding="US-ASCII"?&gt;</code>, if that is helpful.</p>
  
  <p>In my console, when I run <code>ruby hashrunner.rb</code>, I get the error message:</p>
  
  <pre><code>/Users/me/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-4.0.0/lib/active_support/xml_mini/rexml.rb:34:in `parse':The document "doc.xml" does not have a valid root (REXML::ParseException)
  </code></pre>
  
  <p>As someone relatively new to Ruby, I don't understand what this means, and some internet searching didn't turn up an explanation, either. To start, I'm not even sure if I'm calling the XML file correctly in the <code>from_xml</code> method, so please let me know if that's the case. I'd be open to using different gems or a different approach if that would help.</p>