write_element (REXML::Formatters::Pretty)

    # File temp/formatters/pretty.rb, line 37
          def write_element(node, output)
            output << ' '*@level
            output << "<#{node.expanded_name}"

            node.attributes.each_attribute do |attr|
              output << " "
              attr.write( output )
            end unless node.attributes.empty?

            if node.children.empty?
              if @ie_hack
                output << " "
              end
              output << "/"
            else
              output << ">"
              # If compact and all children are text, and if the formatted output
              # is less than the specified width, then try to print everything on
              # one line
              skip = false
              if compact
                if node.children.inject(true) {|s,c| s & c.kind_of?(Text)}
                  string = ""
                  node.children.each { |child| write( child, string, 0 ) }
                  if string.length + @level < @width
                    output << string
                    skip = true
                  end
                end
              end
              unless skip
                output << "\n"
                @level += @indentation
                node.children.each { |child|
                  next if child.kind_of?(Text) and child.to_s.strip.length == 0
                  write( child, output )
                  output << "\n"
                }
                @level -= @indentation
                output << ' '*@level
              end
              output << "</#{node.expanded_name}"
            end
            output << ">"
          end