module ActiveSupport::XmlMini_REXML

def parse(data)

XML Document string or IO to parse
data::

and uses the defaults from Active Support.
Same as XmlSimple::xml_in but doesn't shoot itself in the foot,

Parse an XML Document string or IO into a simple hash.
def parse(data)
  if !data.respond_to?(:read)
    data = StringIO.new(data || "")
  end
  if data.eof?
    {}
  else
    require_rexml unless defined?(REXML::Document)
    doc = REXML::Document.new(data)
    if doc.root
      merge_element!({}, doc.root, XmlMini.depth)
    else
      raise REXML::ParseException,
        "The document #{doc.to_s.inspect} does not have a valid root"
    end
  end
end