From: Trans Date: 2008-08-10T08:53:24+09:00 Subject: Re: XML -> Ruby mapping: is there a 'standard' approach? On Aug 9, 10:19 am, "Bill Walton" wrote: > Background: > > I'm working on a library to read XML files and convert their contents to a set of Ruby objects.  The XML files conform to an ASTM standard and there's an XSD.  The Java guys are using JAXB to generate their classes from the XSD.  I'm not aware of an equivalent to JAXB for Ruby and so am going at the task manually. > > Question: > > Is there a standard / recommended approach, documented somewhere, that I could use to guide my decisions re: translating the XML structure into a Ruby class hierarchy? I worked on something like this for awhile (Blow/XDK), but it felt so heavy and un-ruby that I let it go. Using more flexible tools like XML::Simple, Hpricot, Builder, and Cherry/rQuery are so much nicer. T.