Rails extends Hash with from\_xml

```
xml = <<-XML
  <?xml version="1.0" encoding="UTF-8"?>
    <hash>
      <foo type="integer">1</foo>
      <bar type="integer">2</bar>
    </hash>
XML

hash = Hash.from_xml(xml)
# => {"hash"=>{"foo"=>1, "bar"=>2}}

```

I'm struggling to find any examples for how to do this in Elixir in a comparably easy way.

Something like:

```
Map.from_xml(xml)
# => %{"hash" => %{"foo" => 1, "bar" => 2}}

```