write_element( node, output ) protected

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rexml/formatters/default.rb, line 63
      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
Register or log in to add new notes.