      @staticmethod
      def _comparison_value(value):
          # The XML serializer handles everything as strings, so comparisons
          # need to be performed on the stringified value
          return six.text_type(value)
  
      @staticmethod
      def _validate_output(serial_str):
          try:
              minidom.parseString(serial_str)
 
</s> remove         if isinstance(file, six.string_types):
 </s> add         if isinstance(file, str): </s> remove         if value and isinstance(value, six.string_types):
 </s> add         if value and isinstance(value, str): </s> remove         if not isinstance(index, (slice,) + six.integer_types):
 </s> add         if not isinstance(index, (int, slice)): </s> remove                 val = six.text_type(val)
 </s> add                 val = str(val) </s> remove         if isinstance(file, six.string_types) or file is None:
 </s> add         if isinstance(file, str) or file is None:
        return str(value)
      @staticmethod
      def _comparison_value(value):
          # The XML serializer handles everything as strings, so comparisons
          # need to be performed on the stringified value
        return str(value)
  
      @staticmethod
      def _validate_output(serial_str):
          try:
              minidom.parseString(serial_str)
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/serializers/test_xml.py