module MultiXml

def parse(xml, options={})

:symbolize_keys :: If true, will use symbols instead of strings for the keys.

Options

Parse an XML string into Ruby.
def parse(xml, options={})
  xml.strip!
  begin
    hash = typecast_xml_value(undasherize_keys(parser.parse(xml))) || {}
  rescue parser.parse_error => error
    raise ParseError, error.to_s, error.backtrace
  end
  hash = symbolize_keys(hash) if options[:symbolize_keys]
  hash
end