.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Template::Plugin::XML::RSS 3pm" .TH Template::Plugin::XML::RSS 3pm "2022-07-04" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Template::Plugin::XML::RSS \- Plugin interface to XML::RSS .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& [% USE news = XML.RSS(\*(Aqnews.rdf\*(Aq) %] \& \& [% FOREACH item IN news.items %] \& [% item.title %] \& [% item.link %] \& [% END %] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This Template Toolkit plugin provides a simple interface to the \&\s-1XML::RSS\s0 module. .PP .Vb 1 \& [% USE news = XML.RSS(\*(Aqmysite.rdf\*(Aq) %] .Ve .PP It creates an \s-1XML::RSS\s0 object, which is then used to parse the \s-1RSS\s0 file specified as a parameter in the \s-1USE\s0 directive. A reference to the \s-1XML::RSS\s0 object is then returned. .PP An \s-1RSS\s0 (Rich Site Summary) file is typically used to store short news \&'headlines' describing different links within a site. This example is extracted from http://slashdot.org/slashdot.rdf. .PP .Vb 4 \& \& \& \& \& Slashdot:News for Nerds. Stuff that Matters. \& http://slashdot.org \& News for Nerds. Stuff that Matters \& \& \& \& Slashdot \& http://slashdot.org/images/slashdotlg.gif \& http://slashdot.org \& \& \& \& DVD CCA Battle Continues Next Week \& http://slashdot.org/article.pl?sid=00/01/12/2051208 \& \& \& \& Matrox to fund DRI Development \& http://slashdot.org/article.pl?sid=00/01/13/0718219 \& \& \& \& Mike Shaver Leaving Netscape \& http://slashdot.org/article.pl?sid=00/01/13/0711258 \& \& \& .Ve .PP The attributes of the channel and image elements can be retrieved directly from the plugin object using the familiar dotted compound notation: .PP .Vb 3 \& [% news.channel.title %] \& [% news.channel.link %] \& [% news.channel.etc... %] \& \& [% news.image.title %] \& [% news.image.url %] \& [% news.image.link %] \& [% news.image.etc... %] .Ve .PP The list of news items can be retrieved using the 'items' method: .PP .Vb 4 \& [% FOREACH item IN news.items %] \& [% item.title %] \& [% item.link %] \& [% END %] .Ve .SH "AUTHORS" .IX Header "AUTHORS" This plugin was written by Andy Wardley inspired by an article in Web Techniques by Randal Schwartz. .PP The \s-1XML::RSS\s0 module, which implements all of the functionality that this plugin delegates to, was written by Jonathan Eisenzopf. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 1996\-2006 Andy Wardley. All Rights Reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Template::Plugin, \s-1XML::RSS\s0, XML::Parser