From: "A. S. Bradbury" Date: 2006-07-31T23:07:36+09:00 Subject: Re: humanized Xml tree navigation On Monday 31 July 2006 14:43, NAKAMURA, Hiroshi wrote: > 0% irb > irb(main):001:0> require 'xsd/mapping' > => true > irb(main):002:0> people = XSD::Mapping.xml2obj(File.read("people.xml")) > => # {}person=[#, > #, > #]> > irb(main):003:0> people.person.each { |person| p person } > # > # > # > => [#, > #, > #] > irb(main):004:0> people.person[2].name > => "name3" > irb(main):005:0> people.person.name > NoMethodError: undefined method `name' for # > from (irb):5 > irb(main):006:0> > > Almost. > > Regards, > // NaHi That's really nice, I'd looked over that in the standard library. I've used Roxml with success to achieve the same effect, but it requires more work. Alex