[modules] Parsing pubDate with CDATA
See original GitHub issueThis feed contains items with next format:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://a.espncdn.com/dev/styles/espnfc/asteroids/rss.css" ?>
<rss version="2.0">
<channel>
<title><![CDATA[ESPN FC News]]></title>
<link>http://www.espnfc.com/feed</link>
<description><![CDATA[ESPN FC News RSS Feed]]></description>
<language>en-us</language>
<copyright><![CDATA[Copyright © ESPN Internet Ventures]]></copyright>
<image>
<url>http://a.espncdn.com/combiner/i/?img=/wireless/alerts/smsSplash/fc/fcicon.png&amp;w=110&amp;h=110&amp;scale=crop&amp;site=espnfc</url>
<width>110</width>
<height>110</height>
</image>
<item>
<guid>2965916</guid>
<title><![CDATA[Spain vs. Italy highlights international break]]></title>
<description>
<img style="float: left; margin-right: 10px;" src="http://a.espncdn.com/combiner/i/?img=/photo/2016/0627/r96608_1296x729_16-9.jpg&amp;w=100&amp;h=80&amp;scale=crop&amp;site=espnfc" /><![CDATA[Spain's rematch with Italy headlines October's slate of World Cup qualifiers. Meanwhile, Gareth Southgate takes his first game in charge as England manager and can France keep moving forward vs. Bulgaria? Miguel Delaney &#187;]]>
</description>
<link>http://www.espnfc.com/world-cup-qualifying/61/blog/post/2965917/spain-italy-renew-rivalry-gareth-southgate-takes-charge-of-england</link>
<pubDate><![CDATA[Oct 5, 2016 12:49 AM PDT]]></pubDate>
<enclosure length="150"
url="http://a.espncdn.com/combiner/i/?img=/photo/2016/0627/r96608_1296x729_16-9.jpg&amp;w=100&amp;h=80&amp;scale=crop&amp;site=espnfc"
type="image/jpeg"/>
<category>null</category>
</item>
<item>
<guid>2966016</guid>
<title><![CDATA[Trending: England and Man United's Wayne Rooney feeling scrutinised ]]></title>
<description>
<img style="float: left; margin-right: 10px;" src="http://a.espncdn.com/combiner/i/?img=/photo/2016/0615/r92815_1296x729_16-9.jpg&amp;w=100&amp;h=80&amp;scale=crop&amp;site=espnfc" /><![CDATA[Here are the latest stories for Wednesday.
<img align="left" height="50"]]>
</description>
<link>http://www.espnfc.com/team/england/448/blog/post/2966016/trending-england-and-manchester-uniteds-wayne-rooney-feeling-scrutinised</link>
<pubDate><![CDATA[Oct 5, 2016 06:00 AM PDT]]></pubDate>
<enclosure length="150"
url="http://a.espncdn.com/combiner/i/?img=/photo/2016/0615/r92815_1296x729_16-9.jpg&amp;w=100&amp;h=80&amp;scale=crop&amp;site=espnfc"
type="image/jpeg"/>
<category>Blog Post</category>
<category><![CDATA[England]]></category>
<author>ESPN staff</author>
</item>
</channel>
</rss>
It looks like the pubDate
not parsed, so SyndEntry.getPublishedDate()
returns null
.
Please can you fix it, I use latest version from maven central: 1.7.0
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to access <content:encoded> with CDATA from RSS feed?
Therefore, you need to use the ->children() method to select the right namespace: echo $item->children('http://purl.org/rss/1.0/modules/content ...
Read more >RSS Feed Reading CDATA Problem - MSDN - Microsoft
Hi,. Have you tried XmlTextReader and Linq to XML to parse the XML? while (reader.Read()). {. switch (reader.NodeType).
Read more >f# - RSS Parser for Blog Feed - Code Review Stack Exchange
Rss.fs. And the parsing code. The Rss module contains all the record types and a single Parse method that returns a RssFeed record....
Read more >How to parse images from CDATA in RSS feed - Drupal
hello can anybody pls help me with directions how to setup feeds to get image from description element of feed item ? regards....
Read more >WordPress plugins and themes
parse_feed Parse the feed from the server oik-batch. ... xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > - [oik] plugins.com ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Привет! The problem is not in
CDATA
, it is in their custom date format. It’s almost RFC 822 but not really. There should be noAM
in an RFC 822 time. Although we could support this format, it seems pretty arbitrary. I wonder why they chose to format it like this and what tools did they use to do it.I would contact the owner of the feed and ask them to adhere to the standard. Same goes for #318. If you still think that Rome should support these formats, please tell why.
@Hronom I meant that you should contact them. But now you don’t really need to, since you can define custom date formats in
rome.properties
.