PHP 8.2.31
Preview: cdata.rb Size: 1.58 KB
//proc/thread-self/root/opt/alt/ruby25/lib64/ruby/2.5.0/rexml/cdata.rb

# frozen_string_literal: false
require "rexml/text"

module REXML
  class CData < Text
    START = '<![CDATA['
    STOP = ']]>'
    ILLEGAL = /(\]\]>)/

    #   Constructor.  CData is data between <![CDATA[ ... ]]>
    #
    # _Examples_
    #  CData.new( source )
    #  CData.new( "Here is some CDATA" )
    #  CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element )
    def initialize( first, whitespace=true, parent=nil )
      super( first, whitespace, parent, false, true, ILLEGAL )
    end

    # Make a copy of this object
    #
    # _Examples_
    #  c = CData.new( "Some text" )
    #  d = c.clone
    #  d.to_s        # -> "Some text"
    def clone
      CData.new self
    end

    # Returns the content of this CData object
    #
    # _Examples_
    #  c = CData.new( "Some text" )
    #  c.to_s        # -> "Some text"
    def to_s
      @string
    end

    def value
      @string
    end

    # == DEPRECATED
    # See the rexml/formatters package
    #
    # Generates XML output of this object
    #
    # output::
    #   Where to write the string.  Defaults to $stdout
    # indent::
    #   The amount to indent this node by
    # transitive::
    #   Ignored
    # ie_hack::
    #   Ignored
    #
    # _Examples_
    #  c = CData.new( " Some text " )
    #  c.write( $stdout )     #->  <![CDATA[ Some text ]]>
    def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
      Kernel.warn( "#{self.class.name}.write is deprecated", uplevel: 1)
      indent( output, indent )
      output << START
      output << @string
      output << STOP
    end
  end
end

Directory Contents

Dirs: 5 × Files: 30

Name Size Perms Modified Actions
dtd DIR
- drwxr-xr-x 2024-03-03 22:47:46
Edit Download
- drwxr-xr-x 2024-03-03 22:47:46
Edit Download
light DIR
- drwxr-xr-x 2024-03-03 22:47:46
Edit Download
parsers DIR
- drwxr-xr-x 2024-03-03 22:47:46
Edit Download
- drwxr-xr-x 2024-03-03 22:47:46
Edit Download
1.92 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
5.53 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
1.58 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
2.66 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
2.12 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
7.64 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
9.51 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
44.38 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
1.16 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
5.39 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
11.90 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
2.05 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
1.12 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
2.17 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
550 B lrw-r--r-- 2021-04-05 11:46:35
Edit Download
4.27 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
1.25 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
9.12 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
1.32 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
3.61 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
824 B lrw-r--r-- 2021-04-05 11:46:35
Edit Download
7.64 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
3.84 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
716 B lrw-r--r-- 2021-04-05 11:46:35
Edit Download
13.78 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
241 B lrw-r--r-- 2021-04-05 11:46:35
Edit Download
2.71 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
2.32 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
3.34 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download
20.44 KB lrw-r--r-- 2021-04-05 11:46:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).