Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RSS v2 parser by default #274

Merged
merged 1 commit into from
Mar 1, 2016
Merged

Use RSS v2 parser by default #274

merged 1 commit into from
Mar 1, 2016

Conversation

mishako
Copy link
Member

@mishako mishako commented Feb 27, 2016

Changed RSS v2 parser to match any feed that has "rss" as root element.
This makes Rome more lenient when handling feeds that don't adhere to
the RSS spec, namely have the "version" attribute missing.

Fixes #186

@@ -51,16 +50,10 @@ protected Description parseItemDescription(final Element rssRoot, final Element

@Override
public boolean isMyType(final Document document) {
return rootElementMatches(document) && versionMatches(document);
return rootElementMatches(document);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only work as long as the RSS 2.0 parser is the last RSS parser that will be checked. As far as I know this is depending on the order in rome.properties. I would propose to check whether the version matches (like before) or whether the version is null.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Changed RSS v2 parser to match any feed that has "rss" as root element.
This makes Rome more lenient when handling feeds that don't adhere to
the RSS spec, namely have the "version" attribute missing.
@PatrickGotthard PatrickGotthard added this to the Version 1.6.0 milestone Mar 1, 2016
PatrickGotthard added a commit that referenced this pull request Mar 1, 2016
Use RSS2 parser as fallback when no version is set
@PatrickGotthard PatrickGotthard merged commit a058deb into rometools:master Mar 1, 2016
@mishako mishako deleted the rss-2-by-default branch March 25, 2016 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants