I would like to to create XML that begins with:
<?xml version = "1.0" encoding = "UTF-8" standalone ="no"?>
But I cannot find how to add the ‘standalone‘ option in the Nokogiri documentation.
My code is like this:
builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8', :standalone => 'no') do |xml|
But it fails when Nokogiri finds :standalone. The :encoding works.
The way around this is to tell Nokogiri::XML::Builder to use an existing XML document by using the
withmethod: