# RSS feed on dashboard

**URL:** <https://discourse.nodered.org/t/rss-feed-on-dashboard/12603>\
**Category:** Dashboard\
**Created:** [26 June 2019 09:38 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603 "2019-06-26T09:38:05Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![karcio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karcio/32/9653_2.png) [@karcio](https://discourse.nodered.org/u/karcio)\
**Post date:** [26 June 2019 09:38 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/1 "2019-06-26T09:38:05Z")

</div>

Hi guys,

I'm new with node-red, I want to display RSS feeds on dashboard, but so far I can only display last feed not all, I was trying use template and text. No luck so far, should I use loop?

`[{"id":"1a287e46.6039fa","type":"ui_template","z":"e8db5bfc.e69288","group":"8c8d1686.82337","name":"","order":1,"width":0,"height":0,"format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":966.6666870117188,"y":195.83334350585938,"wires":[[]]},{"id":"8c8d1686.82337","type":"ui_group","z":"","name":"RSS","tab":"43b3d1f8.d20da8","disp":true,"width":"6","collapse":false},{"id":"43b3d1f8.d20da8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]`

Regards

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [26 June 2019 09:44 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/2 "2019-06-26T09:44:43Z")

</div>

Unfortunately your flow isn't currently importable.Please read the following post [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) and then edit the above message.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [26 June 2019 10:12 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/3 "2019-06-26T10:12:21Z")

</div>

Take a look at this example of how to build a table.

> [@EXAMPLE (template) - displaying a two dimensional table](https://discourse.nodered.org/t/example-template-displaying-a-two-dimensional-table/662):
>
> Problem: You need to display a table with first name, last name and age. Sample data: Paul Doe, 24 Greg Jones, 31 Able Smith, 29 We will use a function node to create the table like this: And display the table using the template node. Here is what we use in the template node: [09%20AM] In this case we use the ng-repeat twice, once to process each row of the table in the \<tr\> and once to display each item in each row using a \<td\> element. Here is what the display will look li…

You will also need to add a debug node to your RSS feed to see how the data coming out is formatted

---

<div class="post-metadata">

**Author:** ![karcio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karcio/32/9653_2.png) [@karcio](https://discourse.nodered.org/u/karcio)\
**Post date:** [26 June 2019 11:19 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/4 "2019-06-26T11:19:22Z")

</div>

I think I'm doing something wrong, bacuse now with

```auto
<table id="table" >
 <tr>
    <th>content</th> 
  </tr>
 <tbody>
 <tr ng-repeat="row in msg.payload">
    <td ng-repeat="item in row" >{{item}}</td>
 </tr>
 </tbody>
</table>

```

Nothing displayed, only content but not articles. My feed format is just string like  
"string"

```auto

[{"id":"1a287e46.6039fa","type":"ui_template","z":"e8db5bfc.e69288","group":"8c8d1686.82337","name":"","order":1,"width":"0","height":"0","format":"<table id=\"table\" >\n <tr>\n <th>content</th> \n </tr>\n <tbody>\n <tr ng-repeat=\"row in msg.payload\">\n <td ng-repeat=\"item in row\" >{{item}}</td>\n </tr>\n </tbody>\n</table>","storeOutMessages":false,"fwdInMessages":true,"templateScope":"local","x":665.6666870117188,"y":249.83334350585938,"wires":[[]]},{"id":"8c8d1686.82337","type":"ui_group","z":"","name":"RSS","tab":"43b3d1f8.d20da8","disp":true,"width":"6","collapse":false},{"id":"43b3d1f8.d20da8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 June 2019 12:09 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/5 "2019-06-26T12:09:47Z")

</div>

Without seeing what the input is, there is no way to know what is going on.

---

<div class="post-metadata">

**Author:** ![karcio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karcio/32/9653_2.png) [@karcio](https://discourse.nodered.org/u/karcio)\
**Post date:** [26 June 2019 12:18 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/6 "2019-06-26T12:18:09Z")

</div>

OK, this is my input

`{"topic":"https://www.bbc.co.uk/news/stories-48736937","payload":"A man who may have seen the Isdal Woman on the way to her death; a police officer bitter that the case was shut down - new leads in a 49-year-old puzzle.","article":{"title":"Death in Ice Valley: New clues in Isdal Woman mystery","description":"A man who may have seen the Isdal Woman on the way to her death; a police officer bitter that the case was shut down - new leads in a 49-year-old puzzle.","summary":"A man who may have seen the Isdal Woman on the way to her death; a police officer bitter that the case was shut down - new leads in a 49-year-old puzzle.","date":"2019-06-24T23:36:52.000Z","pubdate":"2019-06-24T23:36:52.000Z","pubDate":"2019-06-24T23:36:52.000Z","link":"https://www.bbc.co.uk/news/stories-48736937","guid":"https://www.bbc.co.uk/news/stories-48736937","author":null,"comments":null,"origlink":null,"image":{},"source":{},"categories":[],"enclosures":[],"rss:@":{},"rss:title":{"@":{},"#":"Death in Ice Valley: New clues in Isdal Woman mystery"},"rss:description":{"@":{},"#":"A man who may have seen the Isdal Woman on the way to her death; a police officer bitter that the case was shut down - new leads in a 49-year-old puzzle."},"rss:link":{"@":{},"#":"https://www.bbc.co.uk/news/stories-48736937"},"permalink":"https://www.bbc.co.uk/news/stories-48736937","rss:guid":{"@":{"ispermalink":"true"},"#":"https://www.bbc.co.uk/news/stories-48736937"},"rss:pubdate":{"@":{},"#":"Mon, 24 Jun 2019 23:36:52 GMT"},"meta":{"#ns":[{"xmlns:dc":"http://purl.org/dc/elements/1.1/"},{"xmlns:content":"http://purl.org/rss/1.0/modules/content/"},{"xmlns:atom":"http://www.w3.org/2005/Atom"},{"xmlns:media":"http://search.yahoo.com/mrss/"}],"@":[{"xmlns:dc":"http://purl.org/dc/elements/1.1/"},{"xmlns:content":"http://purl.org/rss/1.0/modules/content/"},{"xmlns:atom":"http://www.w3.org/2005/Atom"},{"xmlns:media":"http://search.yahoo.com/mrss/"}],"#xml":{"version":"1.0","encoding":"UTF-8"},"#type":"rss","#version":"2.0","title":"BBC News - World","description":"BBC News - World","date":"2019-06-26T11:57:44.000Z","pubdate":"2019-06-26T11:57:44.000Z","pubDate":"2019-06-26T11:57:44.000Z","link":"https://www.bbc.co.uk/news/","xmlurl":null,"xmlUrl":null,"author":null,"language":"en-gb","favicon":null,"copyright":"Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions of reuse.","generator":"RSS for Node","cloud":{},"image":{"url":"https://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif","title":"BBC News - World"},"categories":[],"rss:@":{},"rss:title":{"@":{},"#":"BBC News - World"},"rss:description":{"@":{},"#":"BBC News - World"},"rss:link":{"@":{},"#":"https://www.bbc.co.uk/news/"},"rss:image":{"@":{},"url":{"@":{},"#":"https://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif"},"title":{"@":{},"#":"BBC News - World"},"link":{"@":{},"#":"https://www.bbc.co.uk/news/"}},"rss:generator":{"@":{},"#":"RSS for Node"},"rss:lastbuilddate":{"@":{},"#":"Wed, 26 Jun 2019 11:57:44 GMT"},"rss:copyright":{"@":{},"#":"Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions of reuse."},"rss:language":{"@":{},"#":"en-gb"},"rss:ttl":{"@":{},"#":"15"}}},"_msgid":"e8f9d8b5.9ead98"}`

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 June 2019 12:31 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/7 "2019-06-26T12:31:07Z")

</div>

You are sending an `object` not an `array` which the example uses

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [26 June 2019 12:33 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/8 "2019-06-26T12:33:41Z")

</div>

That also only shows one article so that's all there is to display

---

<div class="post-metadata">

**Author:** ![karcio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karcio/32/9653_2.png) [@karcio](https://discourse.nodered.org/u/karcio)\
**Post date:** [26 June 2019 13:24 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/9 "2019-06-26T13:24:24Z")

</div>

> [@zenofmud](#):
>
> You are sending an `object` not an `array` which the example uses

How can I turn this to json array?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 June 2019 13:56 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/10 "2019-06-26T13:56:28Z")

</div>

You will have to convert it somehow maybe with a function node. You will only get one row in the output as it stands now.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [26 June 2019 14:00 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/11 "2019-06-26T14:00:07Z")

</div>

Lets take a step back...

> [@karcio](#):
>
> I want to display RSS feeds on dashboard, but so far I can only display last feed

The debug output you posted only has one post, so assuming you still want to display more than one post, you need to fix that problem first. How are you getting the RSS feed into Node-RED?

---

<div class="post-metadata">

**Author:** ![karcio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karcio/32/9653_2.png) [@karcio](https://discourse.nodered.org/u/karcio)\
**Post date:** [26 June 2019 14:15 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/12 "2019-06-26T14:15:09Z")

</div>

> [@zenofmud](#):
>
> You will have to convert it somehow maybe with a function node. You will only get one row in the output as it stands now.

Using feedparser

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f5fc3b1f68662e335c656dc6203c5bfa6a0dfd60.png)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [26 June 2019 14:24 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/13 "2019-06-26T14:24:50Z")

</div>

the feedpasser node only passes on new entries (as described in its readme)

So you could get zero, 1 or many results.

If you want the last 5 entries you would be better off using the http request node.

---

<div class="post-metadata">

**Author:** ![karcio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karcio/32/9653_2.png) [@karcio](https://discourse.nodered.org/u/karcio)\
**Post date:** [26 June 2019 15:18 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/14 "2019-06-26T15:18:49Z")

</div>

thank you, Ok, so I did try http request

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/485ee7518c7b6ac4c4cb58ba0835dd2b546f9705.png)  
and now my payload looks like:

`<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/shared/bsp/xsl/rss/nolsol.xsl"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title><![CDATA[BBC News - World]]></title> <description><![CDATA[BBC News - World]]></description> <link>https://www.bbc.co.uk/news/</link> <image> <url>https://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif</url> <title>BBC News - World</title> <link>https://www.bbc.co.uk/news/</link> </image> <generator>RSS for Node</generator> <lastBuildDate>Wed, 26 Jun 2019 15:03:53 GMT</lastBuildDate> <copyright><![CDATA[Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions...`

And I can display all on page like  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/433392a43ede5caa811aa75184f241dfe885f8ea.png)

Could you please tell me how can I format xml? Should I use xml node for that?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [26 June 2019 15:33 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/15 "2019-06-26T15:33:19Z")

</div>

well you could try…

Although I thought this was to be in the dashboard so I don’t understand you starting with a http-in node

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 June 2019 08:46 UTC](https://discourse.nodered.org/t/rss-feed-on-dashboard/12603/16 "2019-06-28T08:46:52Z")

</div>

you need to convert it to json first.

```auto
[{"id":"f5210d2.8ffd7f","type":"http request","z":"3d008345.b17004","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"http://feeds.bbci.co.uk/news/uk/rss.xml","tls":"","proxy":"","authType":"basic","x":290,"y":506,"wires":[["d583ab3e.28aa48"]]},{"id":"d583ab3e.28aa48","type":"xml","z":"3d008345.b17004","name":"","property":"payload","attr":"","chr":"","x":446,"y":506,"wires":[["5dcd9d6b.764294"]]},{"id":"6a0d0355.8354ac","type":"inject","z":"3d008345.b17004","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":132,"y":506,"wires":[["f5210d2.8ffd7f"]]},{"id":"5dcd9d6b.764294","type":"debug","z":"3d008345.b17004","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":616,"y":506,"wires":[]}]

```
