Created
October 25, 2016 23:49
-
-
Save langhorst/e4d504cdcc16cf75d93798eb3ca44bf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xml = Nokogiri::XML::Builder.new { root { location {} } }.to_xml | |
# Get this: | |
# => "<?xml version=\"1.0\"?>\n<root>\n <location/>\n</root>\n" | |
# | |
# But want to get this: | |
# => "<?xml version=\"1.0\"?>\n<root>\n <location></location\n</root>\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment