43
# See the rexml/formatters package
42
45
# Generates XML output of this object
45
48
# Where to write the string. Defaults to $stdout
47
# An integer. If -1, no indenting will be used; otherwise, the
48
# indentation will be this number of spaces, and children will be
49
# indented an additional amount. Defaults to -1.
50
# The amount to indent this node by
51
# If transitive is true and indent is >= 0, then the output will be
52
# pretty-printed in such a way that the added whitespace does not affect
53
# the absolute *value* of the document -- that is, it leaves the value
54
# and number of Text nodes in the document unchanged.
56
# Internet Explorer is the worst piece of crap to have ever been
57
# written, with the possible exception of Windows itself. Since IE is
58
# unable to parse proper XML, we have to provide a hack to generate XML
59
# that IE's limited abilities can handle. This hack inserts a space
60
# before the /> on empty tags.
63
57
# c = CData.new( " Some text " )
64
58
# c.write( $stdout ) #-> <![CDATA[ Some text ]]>
65
59
def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
66
#indent( output, indent ) unless transitive
60
Kernel.warn( "#{self.class.name}.write is deprecated" )
61
indent( output, indent )