[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

XML -> Ruby mapping: is there a 'standard' approach?

Bill Walton

8/9/2008 2:20:00 PM

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?

TIA,
Bill
8 Answers

Piyush Ranjan

8/9/2008 8:21:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

I don't know much about standard approach but there are a few libraries out
there which you may use like http://roxml.ruby...

Regards
Piyush

p.s. If you get answer for this question do put it here.

On Sat, Aug 9, 2008 at 7:49 PM, Bill Walton <bill.walton@charter.net> 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?
>
> TIA,
> Bill

Bill Walton

8/9/2008 8:56:00 PM

0

Hi Piyush,

Piyush Ranjan wrote:

> I don't know much about standard approach but there
> are a few libraries out there which you may use like
> http://roxml.ruby...


ROXML looks promising. Don't know why Google didn't find it for me. I'll
have to try some different queries. If you know of any more libraries like
this I'd be very glad to get links.

Thanks!
Bill


Trans

8/9/2008 11:53:00 PM

0



On Aug 9, 10:19=A0am, "Bill Walton" <bill.wal...@charter.net> wrote:
> Background:
>
> I'm working on a library to read XML files and convert their contents to =
a set of Ruby objects. =A0The XML files conform to an ASTM standard and the=
re's an XSD. =A0The Java guys are using JAXB to generate their classes from=
the XSD. =A0I'm not aware of an equivalent to JAXB for Ruby and so am goin=
g 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 Ru=
by 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.

Tim Crowley

1/27/2010 4:19:00 AM

0

On Jan 26, 8:05 pm, here@yomomma. (Obama Nation = Abomination) wrote:
> On Wed, 27 Jan 2010 03:00:30 GMT, fr...@skeptictank.org (DamOTclese)
> wrote:
>
> >hereiam@home. (Obamanation = Abomination) wrote:
>
> >> MyFoxDC.com reported.
>
> >Woops! Note the reference, stupid.
>
> Whoops, note the absence of any refutation.

Nothing to refute. you're a moron.
hint: don't forget to hide.



frice

1/28/2010 2:16:00 AM

0

here@yomomma. (Obama Nation = Abomination) wrote:
>On Wed, 27 Jan 2010 03:00:30 GMT, frice@skeptictank.org (DamOTclese)
>>hereiam@home. (Obamanation = Abomination) wrote:
>>> MyFoxDC.com reported.
>>Woops! Note the reference, stupid.
>Whoops, note the absence of any refutation.

Woops! Note the source, stupid.

---
Does belief in astrology cause insanity? http://www.skeptictank.o...

"I don't care if we'd had to fly over with monkeys, just so
we got here." -- Doctor aboard Scientology flight to Haiti.

here

1/28/2010 2:40:00 PM

0

On Thu, 28 Jan 2010 02:15:32 GMT, frice@skeptictank.org (DamOTclese)
wrote:

>here@yomomma. (Obama Nation = Abomination) wrote:
>>On Wed, 27 Jan 2010 03:00:30 GMT, frice@skeptictank.org (DamOTclese)
>>>hereiam@home. (Obamanation = Abomination) wrote:
>>>> MyFoxDC.com reported.
>>>Woops! Note the reference, stupid.
>>Whoops, note the absence of any refutation.
>
>Woops! Note the source, stupid.

Still no refutation of the substance, whigger.

frice

1/29/2010 1:08:00 AM

0

here@yomomma. (Ellie Light) wrote:
>On Thu, 28 Jan 2010 02:15:32 GMT, frice@skeptictank.org (DamOTclese)
>>here@yomomma. (Obama Nation = Abomination) wrote:
>>>On Wed, 27 Jan 2010 03:00:30 GMT, frice@skeptictank.org (DamOTclese)
>>>>hereiam@home. (Obamanation = Abomination) wrote:
>>>>> MyFoxDC.com reported.
>>>>Woops! Note the reference, stupid.
>>>Whoops, note the absence of any refutation.
>>Woops! Note the source, stupid.
>Still no refutation of the substance, whigger.

Woops! Note the rightarded Creationist's inability to vett its sources.

---
Does belief in astrology cause insanity? http://www.skeptictank.o...

"I don't care if we'd had to fly over with monkeys, just so
we got here." -- Doctor aboard Scientology flight to Haiti.

here

1/29/2010 2:08:00 AM

0

On Fri, 29 Jan 2010 01:08:18 GMT, frice@skeptictank.org (DamOTclese)
wrote:

>here@yomomma. (Ellie Light) wrote:
>>On Thu, 28 Jan 2010 02:15:32 GMT, frice@skeptictank.org (DamOTclese)
>>>here@yomomma. (Obama Nation = Abomination) wrote:
>>>>On Wed, 27 Jan 2010 03:00:30 GMT, frice@skeptictank.org (DamOTclese)
>>>>>hereiam@home. (Obamanation = Abomination) wrote:
>>>>>> MyFoxDC.com reported.
>>>>>Woops! Note the reference, stupid.
>>>>Whoops, note the absence of any refutation.
>>>Woops! Note the source, stupid.
>>Still no refutation of the substance, whigger.
>
>Woops! Note the rightarded Creationist's inability to vett its sources.

Nigga's on the verge of a "muh dikk" post or else a threat of mindless
violence post.

Just wait and seee, y'all.




>---
>Does belief in astrology cause insanity? http://www.skeptictank.o...
>
>"I don't care if we'd had to fly over with monkeys, just so
>we got here." -- Doctor aboard Scientology flight to Haiti.
>