RSS feed source not showing all data


(Edinkin) #1

Hi all hoping to get some help.
We are trying to retrieve data from RSS at this address
https://www.health.nsw.gov.au/_layouts/feed.aspx?xsl=1&web=%2FInfectious%2Fdiseases&page=261567ee-0f69-4f97-8b9d-9fd7a43a51f3&wp=86797ef4-eee6-4c4f-b0f0-7b2b031e0dba&pageurl=%2FInfectious%2Fdiseases%2FPages%2FCovid-Cases.aspx

In the browser data retrieved is like this:

<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title>Cases count Update today</title>
<link>
https://www.health.nsw.gov.au/_layouts/feed.aspx?xsl=1&web=/Infectious/diseases&page=261567ee-0f69-4f97-8b9d-9fd7a43a51f3&wp=86797ef4-eee6-4c4f-b0f0-7b2b031e0dba&pageurl=/Infectious/diseases/Pages/Covid-Cases.aspx
</link>
<description>Cases Count</description>
<ttl>60</ttl>
<item>
<title>Covid cases</title>
<link>
https://www.health.nsw.gov.au/_layouts/CopyUtil.aspx?Use=id&Action=dispform&ItemId=1&ListId=eef7ae19-7e9e-45c6-a662-f0ddc96be0fe&WebId=dee68b4e-4279-4d3a-85aa-d12e86d8412c&SiteId=6b5938c2-39b2-4119-a611-a4e23c1d2227
</link>
<description>
<dc:Confirmed>669</dc:Confirmed>
<dc:UnConfirmed>N/A</dc:UnConfirmed>
<dc:Excluded>56,272</dc:Excluded>
<dc:Deaths>6</dc:Deaths>
</description>
<pubDate>Mon, 23 Mar 2020 01:34:29 GMT</pubDate>
</item>
</channel>
</rss>

However Matrix RSS data source and XML data source only see Title, link and update date
|%ds__title%|Record Set Attribute : title|
|%ds__link%|Record Set Attribute : link|
|%ds__pubdate%|Record Set Attribute : pubdate|

Any help would be appreciated.

We are on 5.5.3.1 version of Matrix


(Tbaatar) #2

Hi,

Not sure if you have managed to get this working but out of the box RSS/XML feeds sometimes does not work therefore it requires mapping the xpath.

Here is a working file exported as .tar

EDIT
The only problem I have is the XPATH does not seem to work properly in Matrix for picking up the parent/top level Title, Link and Description.

The following code doesn’t seem to work with Root Tag set to channel:
/title,/link,/description,ttl,item/title,item/link,description/dc:Confirmed,description/dc:UnConfirmed,description/dc:Excluded,description/dc:Death,pubDate

I have also tried explicitly like this:
channel/title,channel/link,channel/description,channel/ttl,channel/item/title,channel/item/link,channel/item/description/dc:Confirmed,channel/item/description/dc:UnConfirmed,channel/item/description/dc:Excluded,channel/item/description/dc:Death,channel/item/pubDate

Both attempts show only the following:

and somehow it merges the 2 titles together: