# File lib/html/rexml-nodepath.rb, line 24 def child_index return "" unless parent siblings = parent.to_a.select do |node| node.kind_of? Element and node.expanded_name == self.expanded_name end return "" if siblings.size < 2 "[" + (siblings.index(self)+1).to_s + "]" end