def to_xml(options = {})
      deprecation_removal_warning(:to_xml)
      to_a.to_xml({ root: "errors", skip_types: true }.merge!(options))
    end
def to_xml(options = {})
      deprecation_removal_warning(:to_xml)
      to_a.to_xml({ root: "errors", skip_types: true }.merge!(options))
    end
Returns an xml formatted representation of the Errors hash.

   person.errors.add(:name, :blank, message: "can't be blank")
   person.errors.add(:name, :not_specified, message: "must be specified")
   person.errors.to_xml
   # =>
   #  <?xml version=\"1.0\" encoding=\"UTF-8\"?>
   #  <errors>
   #    <error>name can't be blank</error>
   #    <error>name must be specified</error>
   #  </errors>