Advertisement
hiro1357

xml2hash.rb

Nov 5th, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.10 KB | None | 0 0
  1. require 'active_support/core_ext'
  2. h = Hash.to_xml("<a><b>1</b><c d=\"3\">2</c></a>")
  3.  
  4. p h["a"]["b"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement