override attributes and elements when inherited

When you inherit from a parent class and you want to override an element, the element is added twice in the xml.

I've changed attributes and elements to hashes to allow overwrites. This can be considered a breaking change (even though no specs were changed or failed), so an update of the changelog is probably required and the version will probably be a minor.