From: John Johnson [mailto:johnatl / mac.com] Sent: Thursday, June 22, 2006 5:30 AM > To: ruby-talk ML > Subject: Re: YAMLT ? > On 17-Jun-2006, at 08:51, Victor 'Zverok' Shepelev wrote: > > > Hi all. > > > > A short question. > > > > XML has XSLT (which is XML itself) > > JSON has less-known JSONT (http://goessner.net/articles/jsont/), which > > also > > is JSON itself. > > > > What about YAMLT? Is it exists? Can it be useful? How can it look? > > > > More practically: is it worse trying to write YAMLT implementation in > > Ruby? > > > > V. > > > > > I would think you could use marshaling to accomplish this. Just write > your own dumper/loader class: > > # Create a sample YAML file. > require 'yaml' > tree = { :name => 'ruby', > :uses => [ 'scripting', 'web', 'testing', 'etc' ] } > File.open("tree.yaml", "w") {|f| YAML.dump(tree, f)} > > # A transformer. > require 'nezbit' > require 'yaml' > tree = YAML.load_file("tree.yaml") > File.open("tree.nzb", "w") { |f| Nezbit.dump(tree, f)} > > # And finally, a routine to use the transformed data. > require 'nezbit' > tree = Nezbit.load_file("tree.nzb") > > Regards, > JJ > Sorry, but I can't understand the example :( What is 'Nezbit' ? How it all works? V.