-
-
Save developerinlondon/f37c0b5ab96e691ebb6e5d4ac6b5337b to your computer and use it in GitHub Desktop.
ruby convert xml to yaml
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
require 'active_support/core_ext/hash/conversions' | |
require 'yaml' | |
file = File.open("data/mconvert.xml", "r") | |
hash = Hash.from_xml(file.read) | |
yaml = hash.to_yaml | |
File.open("data/mirador.yml", "w") { |file| file.write(yaml) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment