method
write_element
write_element( node, output )
protected
Hide source
# File lib/rexml/formatters/default.rb, line 64 def write_element( node, output ) output << "<#{node.expanded_name}" node.attributes.to_a.map { |a| Hash === a ? a.values : a }.flatten.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