Ruby を使用して Google kml ツアーを実行しようとしていますが、このコードで構文エラーが発生します
xml = builder.gx:Tour
コロンは好きではありません。これを強制的にコンパイルする方法はありますか?
しなければならなかった
xml.tag!("gx:tour")
はい、値を入れたい場合は、次のようになります
xml.tag!("gx:tour", "value of gx:tour", "attribute1"=>"attribute1val", "attribute2"=>"attribute2val", ..., "attributeN"=>"attributeNval")
タグ内に別のタグを追加する場合は、
xml.tag!("tag:name", attribute: "value") do |t|
t.title("value for title")
end
そして、単純な値を入れたい場合は、
xml.tag!("tag:name","value for tag", attribute: "attribute value")