0
teste = Nokogiri::XML::DocumentFragment.parse("")
Nokogiri::XML::Builder.with( teste ){ |x|
x.exemplo "teste xml"
}
puts teste.to_xml
Message I printed out
<exemplo>teste xml</exemplo>
Message you desired
<ns:exemplo>teste xml</ns:exemplo>
I already solved this problem, but the code is correct. The interesting thing is that if you want to use the tag ns2, xml['ns2']. tagNamespace1 "Content"
– Magic Oz