Represents a node in the tree. Nodes are never encountered except as superclasses of other objects. Nodes have siblings.
Methods
- E
- F
- I
- N
- P
- T
Instance Public methods
each_recursive()
Link
Visit all subnodes of self
recursively
find_first_recursive()
Link
Find (and return) first subnode (recursively)
for which the block evaluates to true. Returns nil
if none was
found.
indent(to, ind)
Link
index_in_parent()
Link
Returns the position that self
holds in its parent's
array, indexed from 1.
next_sibling_node()
Link
@return the next sibling (nil if unset)
previous_sibling_node()
Link
@return the previous sibling (nil if unset)
to_s(indent=nil)
Link
- indent
-
DEPRECATED This parameter is now ignored. See the formatters in the REXML::Formatters package for changing the output style.
# File lib/rexml/node.rb, line 26 def to_s indent=nil unless indent.nil? Kernel.warn( "#{self.class.name}.to_s(indent) parameter is deprecated" ) f = REXML::Formatters::Pretty.new( indent ) f.write( self, rv = "" ) else f = REXML::Formatters::Default.new f.write( self, rv = "" ) end return rv end