sferik/multi_xml — pull request #27 by tcocca (2012-05-08 15:05:44+00:00)
Title: Updated the content nodes to include attributes (Fixes issue #26)

I added the attributes to the hash for nodes that have actual content in them where we were losing these attributes before.

When the attribute key is 'type' and the value is in the PARSING array the value of the content is type casted just like before, and when type is the only attribute, the typecasted value is the only thing returned for that node (just like before). However if there are other attributes those attributes get put onto a hash and the value stays on the __content__ key. If the type attribute is not typecast-able then the type attribute stays on the hash and the __content__ is just passed through as a string.

examples:
````
123
#=> {'value' => 123'}

123>
#=> {'value' => {'__content__' => '123', 'type' => 'USD'}}

123
#=> {'value' => {'__content__' => 123, 'currency' => 'USD'}}

123
#=> {'value' => {'__content__' => '123', 'currency' => 'USD'}}

123
#=> {'value' => {'__content__' => 123, 'currency' => 'USD', 'type' => 'money'}}
````

Let me know if I am missing anything here or if the specs are incomplete.

This should fix issue #26 as well as issue #1. However, like we discussed in the ticket this is not a backwards compatible change. That could be accomplished with an option on MultiXml.parse but we decided not to do that.

Thanks,
~ Tom