module MultiXml::Parsers::Rexml

def parse(xml)

XML Document IO to parse
xml::

Parse an XML Document IO into a simple hash using REXML
def parse(xml)
  doc = REXML::Document.new(xml)
  if doc.root
    merge_element!({}, doc.root)
  else
    raise REXML::ParseException, "The document #{doc.to_s.inspect} does not have a valid root"
  end
end