# File lib/xml/dom2/xpath.rb, line 294
      def getNodesByXPath(xpath, ns = {})
        xpath = XMLScan::XPath.compile(xpath) unless xpath.is_a? XMLScan::XPath
        if ns.length == 0
          ## collect namespaces
          __collectAncestorNS(ns)
          __collectDescendatNS(ns)
        end
        ret = xpath.call(XPath::DOM::Context.new(self, ns))
        raise "return value is not NodeSet" unless ret.is_a? Array
        ret
      end