Skip to content

Instantly share code, notes, and snippets.

@angelic
Created October 7, 2009 18:42
Show Gist options
  • Save angelic/204303 to your computer and use it in GitHub Desktop.
Save angelic/204303 to your computer and use it in GitHub Desktop.
require 'nokogiri'
def noko_find(file, *css_values)
html = []
File.open(file, "r") do |f|
d = Nokogiri::XML(f)
css_values.each do |css_value|
element = d.css(css_value)
html << d.css(css_value).inner_html
end
end
html
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment