Serialize this color_scale object data to an xml string
 @param [String] str
 @return [String]
489919
def to_xml_string(str = '')
      str << '<colorScale>'
      value_objects.to_xml_string(str)
      colors.each { |color| color.to_xml_string(str) }
      str << '</colorScale>'
    end
1372309
def to_xml_string(str = '')
      str << '<?xml version="1.0" encoding="UTF-8"?>'
      str << ('<Relationships xmlns="' << RELS_R << '">')
      each{ |rel| rel.to_xml_string(str) }
      str << '</Relationships>'
    end
539716
def awesome_nokogiri_xml_node(object)
      if object.is_a?(::Nokogiri::XML::NodeSet) && object.empty?
        return '[]'
      end
      xml = object.to_xml(indent: 2)
      #
      # Colorize tag, id/class name, and contents.
      #
      xml.gsub!(/(<)(\/?[A-Za-z1-9]+)/) { |tag| "#{$1}#{colorize($2, :keyword)}" }
      xml.gsub!(/(id|class)="[^"]+"/i) { |id| colorize(id, :class) }
      xml.gsub!(/>([^<]+)</) do |contents|
        contents = colorize($1, :trueclass) if contents && !contents.empty?
        ">#{contents}<"
      end
      xml
    end
1271276
def to_xml_string(str = '')
      str << '<cfRule '
      serialized_attributes str
      str << '>'
      str << ('<formula>' << [*self.formula].join('</formula><formula>') << '</formula>') if @formula
      @color_scale.to_xml_string(str) if @color_scale && @type == :colorScale
      @data_bar.to_xml_string(str) if @data_bar && @type == :dataBar
      @icon_set.to_xml_string(str) if @icon_set && @type == :iconSet
      str << '</cfRule>'
    end
1251278
def to_xml_string(str="")
      str << '<?xml version="1.0" encoding="UTF-8"?>'
      str << ('<comments xmlns="' << XML_NS << '"><authors>')
      authors.each do  |author|
        str << ('<author>' << author.to_s << '</author>')
      end
      str << '</authors><commentList>'
      each do |comment|
        comment.to_xml_string str
      end
      str << '</commentList></comments>'

    end
648608
def to_xml_string(str='')
      return unless range
      str << "<autoFilter ref='#{range}'>"
      columns.each { |filter_column| filter_column.to_xml_string(str) }
      str << "</autoFilter>"
    end
811179
def to_xml_string(str = '')
      str << '<?xml version="1.0" encoding="UTF-8"?>'
      str << ('<table xmlns="' << XML_NS << '" id="' << (index+1).to_s << '" name="' << @name << '" displayName="' << @name.gsub(/\s/,'_') << '" ')
      str << ('ref="' << @ref << '" totalsRowShown="0">')
      str << ('<autoFilter ref="' << @ref << '"/>')
      str << ('<tableColumns count="' << header_cells.length.to_s << '">')
      header_cells.each_with_index do |cell,index|
        str << ('<tableColumn id ="' << (index+1).to_s << '" name="' << cell.value << '"/>')
      end
      str << '</tableColumns>'
      table_style_info.to_xml_string(str)
      str << '</table>'
    end
800700
def _tree_to_string(cls, root_element, xml_declaration=True, pretty_print=True):
        
        from lxml import etree
        return gf.safe_unicode(etree.tostring(
            root_element,
            encoding="UTF-8",
            method="xml",
            xml_declaration=xml_declaration,
            pretty_print=pretty_print
        ))
492068
def to_xml_string(str = '')
      str << '<?xml version="1.0" encoding="UTF-8"?>'
      str << ('<pivotCacheDefinition xmlns="' << XML_NS << '" xmlns:r="' << XML_NS_R << '" invalid="1" refreshOnLoad="1" recordCount="0">')
      str <<   '<cacheSource type="worksheet">'
      str << (    '<worksheetSource ref="' << pivot_table.range << '" sheet="' << pivot_table.data_sheet.name << '"/>')
      str <<   '</cacheSource>'
      str << (  '<cacheFields count="' << pivot_table.header_cells_count.to_s << '">')
      pivot_table.header_cells.each do |cell|
        str << (  '<cacheField name="' << cell.value << '" numFmtId="0">')
        str <<     '<sharedItems count="0">'
        str <<     '</sharedItems>'
        str <<   '</cacheField>'
      end
      str <<   '</cacheFields>'
      str << '</pivotCacheDefinition>'
    end
598192
def to_xml_string(str = '')
      str << '<xf '
      serialized_attributes str
      str << '>'
      alignment.to_xml_string(str) if self.alignment
      protection.to_xml_string(str) if self.protection
      str << '</xf>'
    end
1281157
def to_xml_string(str = '')
      super(str) do

        colors.each_with_index do |c, index|
          str << '<c:dPt>'
          str << ('<c:idx val="' << index.to_s << '"/>')
          str << '<c:spPr><a:solidFill>'
          str << ('<a:srgbClr val="' << c << '"/>')
          str << '</a:solidFill></c:spPr></c:dPt>'
        end

        @labels.to_xml_string(str) unless @labels.nil?
        @data.to_xml_string(str) unless @data.nil?
        # this is actually only required for shapes other than box 
        str << ('<c:shape val="' << shape.to_s << '"></c:shape>')
      end
    end
1184311
def to_xml_string(str = '')
      return if empty?
      str << '<protectedRanges>'
      each { |range| range.to_xml_string(str) }
      str << '</protectedRanges>'
    end
954273
def to_xml_string(str = '')
      super(str) do
        str << '<c:scatterChart>'
        str << ('<c:scatterStyle val="' << scatter_style.to_s << '"/>')
        str << ('<c:varyColors val="' << vary_colors.to_s << '"/>')
        @series.each { |ser| ser.to_xml_string(str) }
        d_lbls.to_xml_string(str) if @d_lbls
        axes.to_xml_string(str, :ids => true)
        str << '</c:scatterChart>'
        axes.to_xml_string(str)
      end
      str
    end
621464
def to_xml_string(r_index, str = '')
      serialized_tag('row', str, :r => r_index + 1) do
        tmp = '' # time / memory tradeoff, lots of calls to rubyzip costs more
                 # time..
        each_with_index { |cell, c_index| cell.to_xml_string(r_index, c_index, tmp) }
        str << tmp
      end
    end
328524
def colorize(str, type)
      str = CGI.escapeHTML(str) if options[:html]
      if options[:plain] || !options[:color][type] || !inspector.colorize?
        str
      #
      # Check if the string color method is defined by awesome_print and accepts
      # html parameter or it has been overriden by some gem such as colorize.
      #
      elsif str.method(options[:color][type]).arity == -1 # Accepts html parameter.
        str.send(options[:color][type], options[:html])
      else
        str = %Q|<kbd style="color:#{options[:color][type]}">#{str}</kbd>| if options[:html]
        str.send(options[:color][type])
      end
    end
280108
def to_xml_string(str = '')
      valid = RichTextRun::INLINE_STYLES
      data = Hash[self.instance_values.map{ |k, v| [k.to_sym, v] }]
      data = data.select { |key, value| valid.include?(key) && !value.nil? }

      str << '<r><rPr>'
      data.keys.each do |key|
        case key
        when :font_name
          str << ('<rFont val="' << font_name << '"/>')
        when :color
          str << data[key].to_xml_string
        else
          str << ('<' << key.to_s << ' val="' << xml_value(data[key]) << '"/>')
        end
      end
      clean_value = Axlsx::trust_input ? @value.to_s : ::CGI.escapeHTML(Axlsx::sanitize(@value.to_s))
      str << ('</rPr><t>' << clean_value << '</t></r>')
    end
807487
def to_xml_string(str = '')
      str << '<gradientFill '
      serialized_attributes str
      str << '>'
      @stop.each { |s| s.to_xml_string(str) }
      str << '</gradientFill>'
    end