cloocher / xmlhasher

Fast XML to Ruby Hash converter
MIT License
41 stars 21 forks source link

Do not ignore attributes #2

Closed pawelma closed 6 years ago

pawelma commented 10 years ago

Hi. In my opinion when attributes are present in tag they always should be returned. I bumped major because changes can break hashes parsed by 0.0.x version.

cloocher commented 10 years ago

@mpawel007,

Thanks for the patch. As you pointed out, this change is not backward compatible. I suggest to create a configuration flag (ex: ignore_attributes_on_content) and set it to 'true' to keep old behavior by default. In your case, you can set the flag to false to get the new behavior.

How does that sound?

pawelma commented 10 years ago

Seems legit. I'll update pull request after work.

pcriv commented 9 years ago

Hi @pawelma @cloocher is this going to be merged any time soon? :sweat_smile:

pawelma commented 9 years ago

@pablocrivella I'll try to add backward compability this weekend.

pcriv commented 9 years ago

@pawelma is there a way i could use your fork for now? i've been trying without luck

pawelma commented 9 years ago

AFAIR you can clone my repo and checkout branch do_not_ignore_attributes and attributes should be in hash by default.

pcriv commented 9 years ago

Great, thanks @pawelma