[Greasemonkey] help with user script

Christopher Lam christopher.lck at gmail.com
Tue Aug 30 12:51:23 EDT 2005


I would direct you to the excellent XPath tutorial at
www.zvon.org<http://www.zvon.org>
 There is even an XPath playground at 
http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/extras.html
 It seems you would want
//a[contains(@href,'page')]
//a[contains(@href,' ')]
 On 30/08/05, Tom Sonsuwan <tom.sonsuwan at speedydomainregistration.com> 
wrote: 
> 
> var xpath="//a[contains(text(), 'page')]";
> links =
> document.evaluate(xpath,document,null,
> XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
> 
> 1. How can I change var xpath="//a[contains(text(), 'page')]"; so
> that it only return links with certain url in it?
> 
> 2. How to search for phrases with space? var
> xpath="//a[contains(text(), 'page')]";
> 
> Thanks for your help.
> 
> Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050830/213f9e82/attachment.htm


More information about the Greasemonkey mailing list