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
Post a Comment