Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Keep It Simple, Stupid
 
PerlMonks  

Get O'Reilly's top 25 into Template Toolkit

by merlyn (Sage)
on Aug 16, 2003 at 16:57 UTC ( #284342=snippet: print w/ replies, xml ) Need Help??

Description: As a followup to Get the current rank of Learning Perl in O'Reilly's top 25 books, I present a Template-Toolkit chunk to format the top 25 list, using Template::Plugin::XML::LibXML. You can run this by placing it into a file and running tpage on the file.
[%
USE d = XML.LibXML(
  recover => 1,
  html_file => 'http://www.oreilly.com/catalog/top25.html',
);
FOR row = d.findnodes('//h2[contains(.,"Best-Selling")]/following::tab
+le/tr');
  loop.count; " => "; row.findvalue("td[2]/a"); "\n";
END;
-%]
Comment on Get O'Reilly's top 25 into Template Toolkit
Download Code

Back to Snippets Section

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://284342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-04-20 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls