XqUSEme is written to allow XQueries in Firefox.
XqUSEme allows one to perform XQueries on single or multiple local or remote XML files. One can also conveniently query the document currently loaded in the current Firefox tab/window, and if it is poorly formed HTML, it may still be possible to query, since the extension will use Firefox to attempt to convert the HTML into a well-formed (but not validated) document.
The extension now also allows one to have XQueries applied to individual pages as they are loaded (ala Greasemonkey or Stylish) in place of the normal content at the page. One can now also opt to retrieve XML before any attached XSL stylesheet processing instructions are processed.
This extension at present has been tested with Windows and on Linux, but doesn't work on the Mac.
You will need Java installed and enabled to use this extension (you most likely already have it installed).
Until security issues can be adequately assessed, please avoid using XQuery on untrusted sites.
Also be aware that there are known to be some imperfections in handling character sets in certain circumstances.
XQueries are performed via Saxon-B.
Saxon also allows use of Java-based custom functions (see http://www.saxonica.com/documentation/using-xquery/extensibility.html
You can read the README either at http://bahai-library.com/zamir/xqusemeREADME.xhtml
and see the example file at http://bahai-library.com/zamir/examples.xhtml