From: Michael Neumann Date: 2001-09-17T19:28:09+09:00 Subject: [ruby-talk:21281] Re: Ruby objects <-> XML: anyone working on this? Kent Dahl wrote: > Tobin Baker wrote: > > Are there any Ruby analogs of these two Python modules (xml_pickle, > > xml_objectify)? Couldn't find anything on the RAA. > > On a related topic, which I may have mentioned before: > > I've never been too keen on the format provided by xml_pickle and > xmarshal due to: > > 1) its lack of language transparancy (i.e.: Top-level element == > ) > 2) the explicit conversion metadata in the datafile itself ( i.e.: > type="Integer" ) > Try SOAP or XML-RPC for marshalling Ruby objects in a language-independent format (requires SOAP4R or xmlrpc4r to be installed): require "soap/marshal" aString = SOAP::Marshal.marshal( anyObject ) anyObject = SOAP::Marshal.unmarshal( aString ) or require "xmlrpc/marshal" aString = XMLRPC::Marshal.dump( anyObject ) anyObject = XMLRPC::Marshal.load( aString ) Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de