Yes, yes to everyone !!! You can do it. I will give an example to follow.
In js node
app.all('/myCool.:name(rss|xml)', function(req, res){ res.type('xml');
In RSS rss
doctype xml rss( version="2.0", xmlns:content="http://purl.org/rss/1.0/modules/content/", xmlns:atom='http://www.w3.org/2005/Atom' ) channel title My Cool feed link= url //- I use momentjs lastBuildDate= moment().toUTCString() docs http://blogs.law.harvard.edu/tech/rs generator My Nodejs Generator Feeds for RSS each feed, i in myFeeds item title= feed.title guid( isPermaLink="true" )= feed.id updated= feed.date.toUTCString()
In Atom xml
doctype xml feed( xmlns='http://www.w3.org/2005/Atom', xml:lang='es') link( href= url, rel='self' ) //- I use momentjs updated= moment().format("YYYY-MM-DDTHH:mm:ssZ") title My Cool feed author name AlejoNext uri https://alejonext.co generator My Nodejs Generator Feeds for Atom each feed, i in myFeeds entry title!= feed.title id= feed.id updated= moment(feed.date).format("YYYY-MM-DDTHH:mm:ssZ")
This is a great way to create content, you can display any kind of xml in jade.
source share