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

Feed is parsed into the extensions map when there is a single "extension" node #76

Closed
daniellowtw opened this issue Jul 18, 2017 · 3 comments

Comments

@daniellowtw
Copy link

The feed I am trying to parse has a few nodes that are using a different namespace. The library causes the whole feed to be parsed into the extension map instead of just those few nodes. Ideally, I'd like to be able to access the content from the Item slice and discard the extension map.

The feed in question is http://feeds.feedburner.com/blogspot/RLXA

Expected behavior

The feed to parse properly, with extensions limited to only the single offending node.

Actual behavior

The whole feed is put inside the extension map.

Steps to reproduce the behavior

Parsing the following will cause the entry to be in the extension map.

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="text">Foo</title>
	<subtitle type="html">Bar</subtitle>
	<author>
		<name>Foo</name>
	</author>
	<blah:link href="foo" rel="self" type="application/atom+xml" xmlns:blah="http://www.w3.org/2005/Atom"/>
	<entry>
		<id>Foo</id>
		<title type="text">title</title>
		<content type="html">foo</content>
	</entry>
</feed>

but removing the following line will marshal it into the feed struct flawlessly.

	<blah:link href="foo" rel="self" type="application/atom+xml" xmlns:blah="http://www.w3.org/2005/Atom"/>

Note: Please include any links to problem feeds, or the feed content itself!

@mmcdole
Copy link
Owner

mmcdole commented Jul 18, 2017 via email

@mmcdole
Copy link
Owner

mmcdole commented Jul 20, 2017

I've merged your PR into goxpp, so hopefully this should be resolved. I tested myself and the feed is no longer being placed entirely in the extension map.

@daniellowtw
Copy link
Author

Awesome! Thanks for the quick response!

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

No branches or pull requests

2 participants