Skip to content

Instantly share code, notes, and snippets.

@pdtpatrick
Created July 5, 2012 17:23
Show Gist options
  • Save pdtpatrick/967f3182f0349624eb20 to your computer and use it in GitHub Desktop.
Save pdtpatrick/967f3182f0349624eb20 to your computer and use it in GitHub Desktop.
xmlparser
#!/usr/bin/env ruby
require 'nokogiri'
doc = Nokogiri::XML(File.open('/Users/ptaylor/code/smilescripts/RubyCode/testingxml.xml'))
puts doc.css("//HSItemPrice").each { |x| puts x }
puts "Length: " + doc.children.length.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment