From: Brian Lonsdorf Date: 2008-11-27T15:00:21+09:00 Subject: Design suggestion for translations/mappings from xml Hi, i've got an xml file i'm parsing and creating objects from. The xml is not named, nor formatted like my objects, so i need to define a bunch of mappings/translations. I'm looking for any design patterns or suggestions people might have to elegantly solve this. xml example: All the comforts of home conveniently... object example: class Hotel attr_accessor :property_name, :brand end There's a bunch of other classes and corresponding awkwardly named tags. It'd be killer if i could do a to_xml as well as from. But not crucial... Thanks for your help! -- Posted via http://www.ruby-forum.com/.