我的问题与根据https://github.com/dam5s/happymapper上的文档创建输出有关这是使用nokogiri的happymapper的分支。我已经使用了2个示例来处理文档。这是我的例子。xml_doc=MilchstrasseAnotherStreet2326131OldenburgGermanyEOFclassAddressincludeHappyMappertag'address'element:housenumber,Integer,:tag=>"housenumber"endclassCountryincludeHappyMappertag'country