    # File lib/nokogiri/xml/node_set.rb, line 126
          def xpath *paths
            handler = ![
              Hash, String, Symbol
            ].include?(paths.last.class) ? paths.pop : nil

            ns = paths.last.is_a?(Hash) ? paths.pop : nil

            sub_set = NodeSet.new(document)
            each do |node|
              sub_set += node.xpath(*(paths + [ns, handler].compact))
            end
            document.decorate(sub_set)
            sub_set
          end