Mark Thomas
3/27/2009 1:25:00 AM
On Mar 26, 11:02 am, Geo Cooper <geocoo...@gmail.com> 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