collapse_text_node (XmlSimple)

    # File lib/xmlsimple.rb, line 519
      def collapse_text_node(hash, element)
        value = node_to_text(element)
        if empty(value) && !element.has_attributes?
          return {}
        end

        if element.has_attributes? && !@options['noattr']
          return merge(hash, @options['contentkey'], value)
        else
          if @options['forcecontent']
            return merge(hash, @options['contentkey'], value)
          else
            return value
          end
        end
      end