I just posted this in response to a question about XPaths and Javascript on Stackoverflow:

I would look for an XSLT javascript library. Since most modern browsers have built-in XSLT support, and XSLT includes support for XPath, it is possible to use that engine to power your XPath selectors.

Personally, I've used Sarissa and the Glyphix jQuery.xslTransform libraries successfully:

* http://jquery.glyphix.com/
* http://dev.abiss.gr/sarissa/

This looks interesting too:

* http://johannburkard.de/software/xsltjs/