Skip to content

Instantly share code, notes, and snippets.

@jewilmeer
Created March 8, 2011 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jewilmeer/860988 to your computer and use it in GitHub Desktop.
Save jewilmeer/860988 to your computer and use it in GitHub Desktop.
parse xml file
require 'net/http'
html = Net::HTTP.get(URI.parse('http://www.w3schools.com/XML/note.xml'))
hash = Hash.from_xml( html )
puts html.inspect
puts hash.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment