NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
XPath insead of manual DOM walking (Score:1)
Reply to This
Re: (Score:1)
Yes, it’s Firefox (and maybe Opera) only, which supports XPath.
Indeed; in general purpose code you would use jQuery (or some other DOM query library of your preference) to write the same thing with CSS3 selectors. This particular case is not as concise as the XPath version because it needs to check text content, which CSS largely has no means to do.
For comparison’s sake, if written in jQu
Re: (Score:1)
Woops. Replace the remaining
$()calls withjQuery(). I haven’t trained myself out of the habit completely yet.Re: (Score:1)
Re: (Score:1)
Here's the announcement of HTTP::Proxy::GreaseMonkey [perl.org].