From: "NAKAMURA, Hiroshi" Date: 2002-03-19T13:23:10+09:00 Subject: Re: [ANN] Xml Serialization for Ruby Hi Chris, > From: Chris Morris [mailto:chrismo@charter.net] > Sent: Tuesday, March 19, 2002 12:07 PM > In your opinion, do you possibly see a need for a > serializer like mine? Yes. Regarding "human readable and editable XML", there must be a need for a new serializer. SOAP might oriented to do so but the current SOAP spec is too complex to read/edit by human. SOAP4R is following SOAP spec so that the serializer of SOAP4R is unsuitable for this purpose. > Or do you think it'd mostly be > duplicated effort? Hmm. I'm sorry but I think so for now. From my SOAP experience, the balance between "human readable" and "completion as a program". For example, you said the envelope stuff wass superfluous but the envelope and id/hrefs are for multi-referenced object. You may think Header and Body is also superfluous but the Header element can be used for extension. 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 puts SOAP::Marshal.marshal( Hobbits[ frodo, peregrin, meriadoc ] ) # Sorry, Sam. => Peregrin Meriadoc Frodo As against SOAP, XML-RPC drops multi-ref-ed object, user defined type and so on so that XML instance of XML-RPC may be much readable/editable for human. Instead of this, it is hard for XML-RPC to unmarshal multi-ref-ed object and user defined type information. You must extend the spec proprietary if you want. (__class__ thing in [ruby-talk:36086] is a kind of this extension, IIRC. That might be a bad example. XML instance of XML-RPC usually more simple. Sorry, Michael) Regards, // NaHi