From: "NAKAMURA, Hiroshi" Date: 2002-03-19T17:01:34+09:00 Subject: Re: [ANN] Xml Serialization for Ruby Hi, all, > From: NAKAMURA, Hiroshi > Sent: Tuesday, March 19, 2002 1:23 PM > require 'soap/marshal' > > class Hobbit > attr_accessor :name, :friend > end > > class Hobbits < Array > @@typeName = 'Hobbit' > end > > frodo = Hobbit.new > frodo.name = 'Frodo' > peregrin = Hobbit.new > peregrin.name = 'Peregrin' > peregrin.friend = frodo > meriadoc = Hobbit.new > meriadoc.name = 'Meriadoc' > meriadoc.friend = frodo Oops. What a boring sample. I intended to add this here; frodo.friend = Hobbits[ peregrin, meriadoc ] > puts SOAP::Marshal.marshal( Hobbits[ frodo, peregrin, meriadoc ] ) > # Sorry, Sam. > > => Marshalled string is too long to read for human. :) Instead of this downside, you can rebuild object graph from marshalled string. Cycle, digraph, recursive and so on. Try; p SOAP::Marshal.unmarshal( dumpedString ) Regards, // NaHi