module Sequel::Plugins::XmlSerializer::DatasetMethods
def to_xml(opts={})
as well as the :array_root_name option for specifying the name of
this dataset. Takes all of the options available to Model#to_xml,
Return an XML string containing all model objects specified with
def to_xml(opts={}) raise(Sequel::Error, "Dataset#to_xml") unless row_proc x = model.xml_builder(opts) name_proc = model.xml_serialize_name_proc(opts) x.send(name_proc[opts.fetch(:array_root_name, model.send(:pluralize, model.send(:underscore, model.name))).to_s]) do |x1| all.each do |obj| obj.to_xml(opts.merge(:builder=>x1)) end end x.to_xml end