From: Dov Murik Date: 2007-03-03T18:01:39+09:00 Subject: Re: ruby equivalent for property or config.xml ? > YAML is what you want, though parsing properties files into ruby > hashes is straightforward. I wondered whether some features of Apache Jakarta Commons Configuration format are available with YAML (or another Ruby gismo): http://jakarta.apache.org/commons/configuration/apidocs/org/apache/commons/configuration/PropertiesConfiguration.html Two interesting features: 1. Variable expansion: user.name = miles first_file = /home/${user.name}/first app_title = ${user.name}'s homepage I think variable expansion is done on reference ("lazy"). YAML has aliases, but can't concatenate strings (which is OK, because YAML is for object (de)serialization...). 2. Layout preservation: The 'load' methods saves the layout of the properties file, including comments, line order, indentation. The 'save' method tries to preserve as much of it as possible. See: http://jakarta.apache.org/commons/configuration/apidocs/org/apache/commons/configuration/PropertiesConfigurationLayout.html Best, Dov. -- Posted via http://www.ruby-forum.com/.