How to use jQuery without a browser?

How to use jQuery without a browser?

I've been using jQuery for several years now.

I am now working on a project where I need to modernize a system of data records.  In the current system I'm working on, there is a file for each record.  The file contains the HTML of the form submitted by the user.  I think that jQuery would be a great tool to parse these files.

I've written some Javascript code that runs in CScript that enumerates and gets the text of each file.  I would like to write something like this:

name = $(htmlFragment).find('#txtName');

However, when I run jQuery thru CScript, it throws an error that the 'window' object doesn't exist.

How can I make jQuery work with CScript with no browser present?                 

I have this question on StackOverflow, as well, but no answer, yet: http://stackoverflow.com/questions/13689871/how-do-i-use-jquery-in-windows-script-host