to_xml (ActiveRecord::Errors)

    # File lib/active_record/validations.rb, line 248
        def to_xml(options={})
          options[:root] ||= "errors"
          options[:indent] ||= 2
          options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent])

          options[:builder].instruct! unless options.delete(:skip_instruct)
          options[:builder].errors do |e|
            full_messages.each { |msg| e.error(msg) }
          end
        end