class REXML::Element

inline code snippets. TODO: switch to REXML::Formatters there sometime.

Public Instance Methods

write(output=$stdout, indent=-1, transitive=false, ie_hack=false) click to toggle source
# File lib/xml/rexml_ext.rb, line 171
def write(output=$stdout, indent=-1, transitive=false, ie_hack=false)
  Kernel.warn("#{self.class.name}.write is deprecated.  See REXML::Formatters")
  formatter = if indent > -1
                if transitive
                  require "rexml/formatters/transitive"
                  REXML::Formatters::Transitive.new( indent, ie_hack )
                else
                  REXML::Formatters::Pretty.new( indent, ie_hack )
                end
              else
                REXML::Formatters::Default.new( ie_hack )
              end
  formatter.write( self, output )
end