Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'nokogiri'
- xml = Sistema.all.to_xml
- builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
- xml.relatorio {
- xml.nome "Milfont"
- }
- end
- @doc = Nokogiri::XML(xml)
- doc = Nokogiri::XML(builder.to_xml)
- item = doc.at_css "relatorio"
- item.add_child @doc.root
- doc.to_xml #xupa!
Add Comment
Please, Sign In to add comment