ruby - How can I generate XML with Nokogiri without "<?xml version=..."? -



ruby - How can I generate XML with Nokogiri without "<?xml version=..."? -

possible duplicate: print xml document without xml header line @ top

i have problem nokogiri::xml::builder. generating xml wth code:

builder = nokogiri::xml::builder.new request { info '1' } end

and result is:

<?xml version="1.0" encoding="utf-8"?><request><data>1</data></request>

how can remove:

<?xml version="1.0" encoding="utf-8"?>

from xml?

maybe take root node of current document object beingness built – .doc – instead of whole document?

builder.doc.root.to_s

ruby xml nokogiri

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -