class REXML::Element

def inspect


e.inspect # => " ... "
e.add_element(REXML::Element.new('baz'))
e.add_element(REXML::Element.new('bar'))

Shows an ellipsis (...), if there are child elements:

e.inspect # => ""
e.add_attributes({'bar' => 0, 'baz' => 1})
e = REXML::Element.new('foo')

Shows attributes, if any:

REXML::Element.new.inspect # => ""

For an element with no attributes and no children, shows the element name:

Returns a string representation of the element.

inspect -> string
:call-seq:
def inspect
  rv = "<#@expanded_name"
  @attributes.each_attribute do |attr|
    rv << " "
    attr.write( rv, 0 )
  end
  if children.size > 0
    rv << "> ... </>"
  else
    rv << "/>"
  end
end