def element!(name, content = nil, attributes = nil)
      build! do
        if content or block_given?
          @_crafted << "<#{name}#{Tools.format_attributes(attributes)}>"
          if block_given?
            value = yield
            content = value if !@_appended or value.kind_of? String
          end
          content = content.to_s
          @_crafted << Tools.escape(content) if content != ""
          @_crafted << "</#{name}>"
        else
          @_crafted << "<#{name}#{Tools.format_attributes(attributes)}/>"
        end
      end
    end
def element!(name, content = nil, attributes = nil)
      build! do
        if content or block_given?
          @_crafted << "<#{name}#{Tools.format_attributes(attributes)}>"
          if block_given?
            value = yield
            content = value if !@_appended or value.kind_of? String
          end
          content = content.to_s
          @_crafted << Tools.escape(content) if content != ""
          @_crafted << "</#{name}>"
        else
          @_crafted << "<#{name}#{Tools.format_attributes(attributes)}/>"
        end
      end
    end
Write an element with the given name, content and attributes. If
 there is no content and no block is given, a self-closing element is
 created. Provide an empty string as content to create an empty,
 non-self-closing element.