# File lib/xml/dom/core.rb, line 627 def _searchID(value, ids = nil) if ids.nil? doc = nil if nodeType == DOCUMENT_NODE doc = self elsif !ownerDocument.nil? doc = ownerDocument else return nil end ids = doc._getIDAttrs end if nodeType == ELEMENT_NODE && _getIDVals(ids).include?(value) return self elsif !@children.nil? @children.each do |node| if !(match = node._searchID(value, ids)).nil? return match end end end return nil end