Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何脚本,或者你们中的任何人构建了一个工具来使用 Nokogiri 将 YAML 转换为 XML?如果没有,有什么建议或样品吗?
我不知道 Nokogiri 有什么,但如果你只想要数据的结构,使用 ActiveSupport 非常简单:
require 'active_support/core_ext' YAML.parse("key: value").transform.to_xml