From: gabriele renzi Date: 2004-05-17T18:13:49+09:00 Subject: Re: We have to_yaml. How about to_xml? il 16 May 2004 15:56:19 -0700, djberg96@hotmail.com (Daniel Berger) ha scritto:: >Yes, I'm aware of xmarshal, but wouldn't it be cool to have that >builtin and included as part of the stdlib? agreed, but maybe you did'nt noticed that we have xml marshaller :) in SOAP: >> require 'soap/marshal' => true >> class C >> def initialize >> @a,@b=1,'ciao' >> end >> end => nil >> SOAP::Marshal.dump(C.new) => "\n\n \n \n 1\n ciao\n \n \n" and in XMLRPC: >> require 'xmlrpc/marshal' => true >> XMLRPC::Marshal.dump(C.new) RuntimeError: Wrong type! from c:/Programmi/Ruby/lib/ruby/1.8/xmlrpc/create.rb:264:in `conv2value' from c:/Programmi/Ruby/lib/ruby/1.8/xmlrpc/create.rb:136:in `methodRespo nse' from c:/Programmi/Ruby/lib/ruby/1.8/xmlrpc/create.rb:135:in `collect' from c:/Programmi/Ruby/lib/ruby/1.8/xmlrpc/create.rb:135:in `methodRespo nse' from c:/Programmi/Ruby/lib/ruby/1.8/xmlrpc/marshal.rb:56:in `dump_respon se' from c:/Programmi/Ruby/lib/ruby/1.8/xmlrpc/marshal.rb:28:in `dump' from (irb):11 >> class C >> include XMLRPC::Marshallable >> end => C >> XMLRPC::Marshal.dump(C.new) => "a1b< string>ciao___class___C\n" on a sidenote I believe that XMLRPC::Marshal should work even with ibject that quacks like Marshallable just like SOAP::Matshal do.