# File lib/xml/dom2/xpath.rb, line 352 def _getMyLocationInXPath(parent) n = parent.childNodes.to_a.select { |i| i.nodeType == TEXT_NODE or i.nodeType == CDATA_SECTION_NODE }.index(self) "text()[#{n + 1}]" end