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

Trying to parse an iTunes XML feed but iTunes tags missing #31

Open
shealan opened this issue Aug 26, 2015 · 2 comments
Open

Trying to parse an iTunes XML feed but iTunes tags missing #31

shealan opened this issue Aug 26, 2015 · 2 comments

Comments

@shealan
Copy link

shealan commented Aug 26, 2015

I'm trying to import an iTunes podcast feed but the iTunes specific tags are being ignored and are not included in the resulting array.

Here's an example of a feed: http://rss.earwolf.com/how-did-this-get-made

All the tags with "itunes:something" are missing from the generated array.

I'd be really grateful for any suggestions you might have on fixing this?

@shealan shealan changed the title Trying to parse an iTunes XML feed but iTunes tags returning null Trying to parse an iTunes XML feed but iTunes tags missing Aug 26, 2015
@florentsuc
Copy link

I had the same problem.

That's linked to the namespaces, but an easy way is to remove the colons before formating.

You will get <itunessomething> instead of <itunes:something>.

Example:

$podcastsXmlString = file_get_contents("http://your/feed.xml");
$podcastsXmlString = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $podcastsXmlString);
$podcastsXml = Formatter::make($podcastsXmlString, Formatter::XML);

@dev2552
Copy link

dev2552 commented Mar 5, 2019

.

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

3 participants