Or perhaps it should be called happyunmapper. I wanted to start using Happymapper element mappings to persist back to XML, so I wrote #to_xml for the nokogiri fork of this project and thought it would be fun and a good idea to write the original for libxml-ruby version.
Tests and ludicrous amounts of comments included.
Unhappymapper (or happyunmapper) which will take the HappyMapper mappings
and write them back to XML
Comments and Test Cleanup
+ #to_xml needed a small amount of refactoring
+ tests were outputting the xml