From: senderista@... (Tobin Baker) Date: 2001-09-17T13:01:01+09:00 Subject: [ruby-talk:21275] Re: Ruby objects <-> XML: anyone working on this? Very cool! I'll have to check this out. I wonder about the second part of my question though -- is anyone working on a more 'Rubyish' alternative to the DOM (which sucks as we all know)? TAKAHASHI Masayoshi wrote in message news:<20010916151218F.maki@open-news.com>... > senderista@hotmail.com (Tobin Baker) wrote: > > Are there any Ruby analogs of these two Python modules (xml_pickle, > > xml_objectify)? Couldn't find anything on the RAA. > > > > xml_pickle: > > http://www-106.ibm.com/developerworks/library/xml-matters1/index.html > > > > xml_objectify: > > http://www-106.ibm.com/developerworks/library/xml-matters2/index.html > > How about XMarshal? > > http://www.goto.info.waseda.ac.jp/~fukusima/ruby/xmarshal.html > http://www.goto.info.waseda.ac.jp/~fukusima/ruby/xmarshal.rb > > > ## xmarshal_sample.rb > require 'xmarshal.rb' > class Foo > def a(val) > @a = val > end > def b(val) > @b = val > end > def c(val) > @c = val > end > end > > foo = Foo.new() > foo.a(1) > foo.b("foo") > foo.c([1,2,3,{"a"=>"b","c"=>"d"}]) > print XMarshal.dump(foo) > > > Result: > > > > > 1 > foo > > 1 > 2 > 3 > > b > d > > > > > > > Regards, > > TAKAHASHI 'Maki' Masayoshi E-mail: maki@open-news.com