From: Phrogz Date: 2007-04-29T07:25:06+09:00 Subject: Re: need help to parse xml (foaf) On Apr 28, 10:43 am, "Patrick Aljord" wrote: > hey all, > I have a foaf.xml that looks like that: [snip] > I'm trying to get the names of all my friends: > "bill" and "bob" require 'rexml/document' doc = REXML::Document.new( DATA.read ) p doc.each_element( '//foaf:knows/foaf:Person/foaf:name/text()' ){} #=> ["bob", "bill"] __END__ myself myself 67b60b91fd6d4f68e32deae93956d36bc7c93c70 bob bill