method
__to_xpath_helper
v2_4_6 -
Show latest stable
- Class:
REXML::Element
__to_xpath_helper(node)private
No documentation available.
# File lib/rexml/element.rb, line 729
def __to_xpath_helper node
rv = node.expanded_name.clone
if node.parent
results = node.parent.find_all {|n|
n.kind_of?(REXML::Element) and n.expanded_name == node.expanded_name
}
if results.length > 1
idx = results.index( node )
rv << "[#{idx+1}]"
end
end
rv
end