method
preceding_node_of
preceding_node_of( node )
private
Hide source
# File lib/rexml/xpath_parser.rb, line 545 def preceding_node_of( node ) psn = node.previous_sibling_node if psn.nil? if node.parent.nil? or node.parent.class == Document return nil end return node.parent #psn = preceding_node_of( node.parent ) end while psn and psn.kind_of? Element and psn.children.size > 0 psn = psn.children[-1] end psn end