Skip to content

Instantly share code, notes, and snippets.

Created July 10, 2015 13:11
Show Gist options
  • Save anonymous/02fbd1c79ac8476a4337 to your computer and use it in GitHub Desktop.
Save anonymous/02fbd1c79ac8476a4337 to your computer and use it in GitHub Desktop.
require "rexml/document"
source = "<xml><foo><bar></bar></foo></xml>"
my_xml = REXML::Document.new source
out = ""
my_xml.write(out, 4)
puts out
# i want to do exactly the oposite of this. I have a string looking like #{out} and want to get back to the "original"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment