From: Mark Thomas Date: 2009-03-27T10:21:41+09:00 Subject: Re: basic xml parsing question On Mar 26, 11:02 am, Geo Cooper wrote: > Below is a partial sample of what I'm trying to parse. The database > tables correspond to the record names. Well, you have hierarchical data (calldetails inside of callsummary) so I'm not sure how you want to map it to your database, but here's a simple parsing example to get you started. Assuming you want all the attributes in each calldetail: doc = Nokogiri::XML.parse(xml) doc.search('//calldetail').each do |call| call.attributes.each do |key,value| puts key + "=" + value end end