From: "NAKAMURA, Hiroshi" Date: 2006-08-07T16:10:15+09:00 Subject: Re: humanized Xml tree navigation -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Bob Hutchison wrote: > Loses child ordering though, mixed content, and the root element? Yes, Yes and Yes. obj2xml and xml2obj is not for round-trip conversion although its name indicates it. I introduced this XML <-> Ruby mapping to avoid bothersome XML DOM programming in Web Services (soap4r). Do you think xampl can help us instead of XSD::Mapping? For example, flickr client is as follows; (cf. http://dev.ctor.org/soap4r/browser/trunk/sample/soap/flickr.rb) flickr = SOAP::RPC::Driver.new('http://www.flickr.com/services/soap/') ... response = flickr.request( :api_key => api_key, :method => 'flickr.test.echo', :name => 'hello world') responsexml = "#{response}" # svr returns partial XML! require 'xsd/mapping' obj = XSD::Mapping.xml2obj(responsexml) p obj.method p obj.name Creating XML request with a Hash and creating Ruby object with XSD::Mapping. Both are for XML <-> Ruby mapping. It's enough small but when I come to create more complexed XML instance... How I can write this with xampl? Regards, // NaHi -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) iQEVAwUBRNbnLR9L2jg5EEGlAQJuNwf/R/Fjt2gFvI01FiAgbvHUCRQX71O710lE hLJ5FpzC7X4gCxrQieUocAfKFpCVSh5kLx5CUUF9tR+9F3TRv+L9C6h+7D4mL/GX zhPVLDBic9CvfhVj7loqkWZKlA5DH/B87DZcfN+dG3PtV+xvMcxVi3Qji/ttFQ5Y kEhBrC3kGHthkDTrT97+mzpwBkbYiuITBQLrYdxNpXvV3PiX3J81e2KmdSvS6ofK Aqq/K9OCC4Wgpcl9QTlF156fPHA6tG3LuX7zLeaOTonM8ANVvAV10eJjQ4Wwh1Pl l0ZbUukPb18uldSzZ7IayxfoYey7kWexoCEyVxzBgzGNMCezsbD7mQ== =BWic -----END PGP SIGNATURE-----