nokogiri gem file code example Example: ruby open file nokogiri doc = File.open("blossom.xml") { |f| Nokogiri::XML(f) }