So far I can only get to each element I wanna know how to get the attributes like address from results that look like <sms protocol="0" address="+18334120420" ... Here's my code that only goes as far as getting each sms element:
file=File.open('test.xml')
doc=Nokogiri::XML.parse(file)
doc.xpath('//sms').each do |msg|
puts msg
end