Method: Nokogiri::XML::Node#traverse

Defined in:
lib/nokogiri/xml/node.rb

#traverse(&block) ⇒ Object

Yields self and all children to block recursively.


654
655
656
657
# File 'lib/nokogiri/xml/node.rb', line 654

def traverse &block
  children.each{|j| j.traverse(&block) }
  block.call(self)
end