0
を使用して.` `ドット付き名前空間XMLノードを作成し、私はXMLを生成する鋸山を使用しています:鋸山
Nokogiri::XML::Builder.new do |xml|
xml['nitf'].nitf('xmlns:nitf' => 'bar') {
// some nodes here
xml.body {
xml.head {
//some nodes here
}
}
}
end
を出力
<nitf:nitf xmlns:nitf="http://iptc.org/std/NITF/2006-10-18/">
// some nodes here
<nitf:body>
<nitf:head>
// some nodes here
</nitf:head>
</nitf:body>
</nitf:nitf>
あるしかし、私は<nitf:body.head>
代わりの<nitf:head>
を持っている必要があります。どのようにそのような結果を達成するには?