Skip to content

FeedKit fails to parse valid RSS feed with source:markdown namespaced elements #215

Description

@andreamoretti890

FeedKit 10.4.0 fails to parse this valid RSS feed:

https://netnewswire.blog/feed.xml

The feed returns HTTP 200, is valid XML, has root element rss, and contains 25 <item> elements. However, parsing with the universal Feed initializer throws:

let url = URL(string: "https://netnewswire.blog/feed.xml")!
let feed = try await Feed(url: url)

Error:

DecodingError.dataCorrupted
Path: channel.item.source.source
Debug description: Failed to decode XMLElement<RSSFeedSourceAttributes> value from key: source
The data couldn’t be read because it isn’t in the correct format.

The feed includes namespaced elements like:

<source:markdown>...</source:markdown>

It looks like XMLKit/FeedKit may be treating source:markdown as the RSS <source> element, then attempting to decode it as RSSFeedSource, which fails.

Temporary workaround: remove <source:markdown>...</source:markdown> from the XML before passing data to Feed(data:).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions