You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nuggihalli,Naren" <Na...@gartner.com> on 2004/02/24 21:00:10 UTC
RSS / XML feed using VTL
Hello,
I am planning to implement RSS/XML button on some of the .jsp pages, so can any one guide me in creating an XML file using VTL?
Thnaks
Naren
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: RSS / XML feed using VTL
Posted by Dave Newton <da...@solaraccess.com>.
On Tue, 2004-02-24 at 15:00, Nuggihalli,Naren wrote:
> can any one guide me in creating an XML file using VTL?
It's just another template file.
<?xml version="1.0"?>
<rss version="0.91">
<channel>
<copyright>$copyright</copyright>
<title>$title</title>
<description>$description</description>
<link>$rsslink</link>
#foreach ($story in $stories)
<item>
<title>$story.getHeadline()</title>
<link>$rssstorylink?id=$story.getId()</link>
<description>$story.getIntro()</description>
</item>
#end
</channel>
</rss>
What else?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org