method
write_element
write_element( node, output )
protected
Hide source
# File lib/rexml/formatters/default.rb, line 63 def write_element( node, output ) output << "<#{node.expanded_name}" node.attributes.to_a.sort_by {|attr| attr.name}.each do |attr| output << " " attr.write( output ) end unless node.attributes.empty? if node.children.empty? output << " " if @ie_hack output << "/" else output << ">" node.children.each { |child| write( child, output ) } output << "</#{node.expanded_name}" end output << ">" end