In ruby on rails i use Nokogiri to create XML files. Now I want to create a XML line like this:
<mis:actions param="-900" accuracy="1" cameraIndex="0" payloadType="0" payloadIndex="0">GimbalPitch</mis:actions>
I thought the code has to look like this (1):
xml['mis'].actions('param' => "-900", "accuracy" => "1", "cameraIndex" => "0", "payloadType" => "0", "payloadIndex" => "0") 'GimbalPitch'
or (2)
xml['mis'].actions('param' => "-900", "accuracy" => "1", "cameraIndex" => "0", "payloadType" => "0", "payloadIndex" => "0") do
'GimbalPitch'
end
But (1) is not working at all and (2) looks like this:
<mis:actions param="-900" accuracy="1" cameraIndex="0" payloadType="0" payloadIndex="0">
So in (2) i miss the part ...GimbalPitch</mis:actions> at the end.
Thanks, Andreas