From: itsme213 Date: 2005-01-22T01:45:56+09:00 Subject: Re: Xpath like syntax > x[:countries][:provinces][:cities, {:name=>"London"}] You should treat [:countries], {:name=>"London"}... as convenient sugar for a general case of a block at any query stage e.g. x[:cities]{|c| c.population > c.houses.capacity.sum}[:streets] And if you prefer "." syntax, you could use Jim Wierich's BlankSlate and catch method_missing so x.cities does the same as x[:countries]. If you really get into this, you could do not just filtering (select/project combinations), but create new nodes i.e. full transformations.