[Greasemonkey] XPath Resources

Nic James Ferrier nferrier at tapsellferrier.co.uk
Thu Sep 28 02:49:55 EDT 2006


"Brendan J" <verifex at gmail.com> writes:

> Hi guys,
>
> I'm looking for some good resources on using the sleek & sexy XPath stuff in
> JS on GM.  I've seen alot of scripts use it, and I have seen that it uses
> some kind of wacky regular expression system to find items in the DOM tree.
> But most of the references I have found online are for using it on XML, so
> I'm looking for references that use it in relation to HTML.  I would like to
> know how to use it efficiently and I'm having a hard time learning about
> it.  Anyone have any good places they look when they need some reference for
> it?

It's not like a regex. Every part of a DOM can be addressed with an
individual xpath.

It is related to XML but it works on any well formed document which
HTML is these days when it is stored in a DOM tree.

You can play with an online eval here:

  http://www.brics.dk/~mis/xpathvisualizer/


-- 
Nic Ferrier
http://www.tapsellferrier.co.uk   for all your tapsell ferrier needs


More information about the Greasemonkey mailing list