index(element)
Returns the index of the supplied child (starting at 1), or -1 if the element is not a child
element
an Element child
# File lib/rexml/element.rb, line 840 def index element rv = 0 found = @element.find do |child| child.kind_of? Element and (rv += 1) and child == element end return rv if found == element return -1 end