Skip to content

Instantly share code, notes, and snippets.

require 'csv'
require 'nokogiri'
xml = File.read('hello.xml')
doc = Nokogiri::XML(xml)
all_the_things = []
doc.xpath('//file').each do |file|
title = file.xpath("./title").first.text