From: gabriele renzi Date: 2004-07-27T22:01:49+09:00 Subject: Re: [REXML] why not Element#[] ? il 26 Jul 2004 09:06:38 -0700, ser@germane-software.com (Sean Russell) ha scritto:: >gabriele renzi wrote in message news:<8st2g0pmbeoeco74njv49uge4cr4rf52n8@4ax.com>... >> I was just wondering why access to attributes of an element is done >> just via #attributes#[]. > >Element#[] is already defined, since it is inherited from Parent. #[] >references all child nodes of an element except attributes. oops, sorry I just took a look at the quick RDoc api and did not thought of inheritance >> if this is not allowed there may be a reason: what is this reason? > >It was, primarily, a design decision: either Element#[] references >nodal children, or Element#[] references attributes. I chose the >children. well, sure now this makes sense, thanks a lot :)