From: TAKAHASHI Masayoshi Date: 2001-09-16T15:17:27+09:00 Subject: [ruby-talk:21255] Re: Ruby objects <-> XML: anyone working on this? 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