From: djberg96@... (Daniel Berger) Date: 2004-09-08T23:25:16+09:00 Subject: Re: yaml nuby question - duplicate keys why the lucky stiff wrote in message news:<413E4D02.9010909@whytheluckystiff.net>... > Daniel Berger wrote: > > > > I'd like to have a config file that looks like this: > > > > # test.yml > > foo: > > user: usr1 > > password: pwd1 > > foo: > > user: usr2 > > password: pwd2 > > bar: > > user: usr3 > > password: pwd3 > > > > It looks like you're trying to emulate XML, nnn? Yeah, the above isn't > allowed in the YAML specification. > > I often use type tagging to emulate XML: > > - !!foo > user: usr1 > password: pwd1 > - !!foo > user: usr2 > password: pwd2 > - !!bar > user: usr3 > password: pwd3 > > I should write up a tutorial on how to do this. Here's the basic > reference: http://yaml4r.sourceforge.net/doc/page/type_families.htm. > > _why Thanks Why, James, Jamis, and David for all your responses. Dan