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