当向 savon 提供:
hash = {
"Objects" => { //stuff here },
:attributes! => { "Objects" => {"xsi:type" => "Something"}}
}
我得到:
<Objects>...</Objects>
当为 savon 提供其他任何东西时,我得到了预期的结果:
hash = {
"foo" => { //stuff here },
:attributes! => { "foo" => {"xsi:type" => "Something"}}
}
我得到:
<foo xsi:type="Something"></foo>
我必须使用字符串“Objects”作为键。我正在编写第 3 方 SOAP Web 服务。我不能使用符号,因为第一个字母会变成小写字母。
谢谢,