Method: REXML::CData#write

Defined in:
lib/rexml/cdata.rb

#write(output = $stdout, indent = -1,, transitive = false, ie_hack = false) ⇒ Object

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 ]]>


60
61
62
63
64
65
66
# File 'lib/rexml/cdata.rb', line 60

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