That would let you do something more like:
```
val = XML.cast(el)
record[el.name] = if val.kind_of? Hash
  Address.new val
else
  val
end
```
which isn't great but a cleaner.