def rest_xml
      doc = REXML::Document.new APIConnection::XML_HEADER
      acs = doc.add_element self.class::RSRC_OBJECT_KEY.to_s
      acs.add_element('name').text = @name
      acs.add_element('sort_1').text = @sort_1 if @sort_1
      acs.add_element('sort_2').text = @sort_2 if @sort_2
      acs.add_element('sort_3').text = @sort_3 if @sort_3

      acs << @criteria.rest_xml

      df = acs.add_element('display_fields')
      @display_fields.each { |f| df.add_element('display_field').add_element('name').text = f }
      add_site_to_xml(doc)
      doc.to_s
    end
def rest_xml
      doc = REXML::Document.new APIConnection::XML_HEADER
      acs = doc.add_element self.class::RSRC_OBJECT_KEY.to_s
      acs.add_element('name').text = @name
      acs.add_element('sort_1').text = @sort_1 if @sort_1
      acs.add_element('sort_2').text = @sort_2 if @sort_2
      acs.add_element('sort_3').text = @sort_3 if @sort_3

      acs << @criteria.rest_xml

      df = acs.add_element('display_fields')
      @display_fields.each { |f| df.add_element('display_field').add_element('name').text = f }
      add_site_to_xml(doc)
      doc.to_s
    end
Clean up the inconsistent "Display Field" keys in the search results.

 Sometimes spaces have been converted to underscores, sometimes not, sometimes both.
 Same for dashes.
 E.g  :"Last Check-in"/:Last_Check_in/:"Last_Check-in", :Computer_Name, and :"Display Name"/:Display_Name

 This ensures there's always the fully underscored version.

 Update an internally used array of the display field names, symbolized, with
 spaces and dashes converted to underscores. We use these
 to overcome inconsistencies in how the names come from the API

 @return [void]

 def standardize_display_field_keys
   spdash =
     us =
       @display_field_std_keys = @display_fields.map { |f| f.gsub(/ |-/, '_').to_sym }
 end