xmlxml-parsingrssxml-namespacespodcast

"XML parsing error: <unknown>:2:0: unbound prefix" in Podcast RSS feed


I'm trying to self-publish my podcast with a RSS feed that I wrote myself. When I check to see if it validates at https://validator.w3.org/feed/ I keep getting the error in the title and it says the error is in Line 2, the RSS tag itself. I've checked the code over and over and over and compared it to valid RSS feeds and it's exactly the same, so I have no idea what the issue is and w3 isn't giving me any indication of how to fix it. Here's my code:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmnls:spotify="https://www.spotify.com/ns/rss"
     xmlns:atom="http://www.w3.org/2005/Atom">

If anyone could tell me what I've done wrong and how to fix it so the feed will validate, it would be greatly appreciated.

Editing to include full code:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmnls:spotify="https://www.spotify.com/ns/rss"
     xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <!-- Main Information -->
        <Title>Entitled Gamers</Title>
        <description>Two friends and streamers SamuraiHerc and PoopShizzle get together once a week to chat about what's new and trending in gaming, streaming, and content creating.</description>
        <link>https://www.mobomu.com/podcasts/entitledgamers/entitledgamers.html</link>
        <image>
            <url>https://www.mobomu.com/podcasts/entitledgamers/img/cover.jpg</url>
        </image>
        <!-- Optional Information -->
        <language>en-US</language>
        <copyright>Copyright 2020, Mobomu Gaming Network</copyright>
        <managingEditor>poopshizzle@mobomu.com</managingEditor>
        <webMaster>herc@mobomu.com</webMaster>
        <!-- iTunes Specifics -->
        <itunes:author>Mobomu</itunes:author>
        <itunes:owner>
            <itunes:name>Mobomu</itunes:name>
            <itunes:email>entitledgamers@mobomu.com</itunes:email>
        </itunes:owner>
        <itunes:image url="https://www.mobomu.com/podcasts/entitledgamers/img/cover.jpg"/>
        <itunes:category text="Leisure">
            <itunes:category text="Video Games" />
        </itunes:category>
        <itunes:category text="Comedy" />
        <itunes:category text="News">
            <itunes:category text="Entertainment News" />
        </itunes:category>
        <itunes:summary>Two friends and streamers SamuraiHerc and PoopShizzle get together once a week to chat about what's new and trending in gaming, streaming, and content creating.</itunes:summary>
        <itunes:type>episodic</itunes:type>
        <!-- Spotify Specifics -->
        <spotify::countryOfOrigin>us</spotify::countryOfOrigin>

        <!-- Episode 1 -->
        <item>
            <title>Games are Getting More Expensive?</title>
            <enclosure url="https://www.mobomu.com/podcasts/entitledgamers/audio/episode-001.mp3"
                       length="103132759" type="audio/mpeg"/>
            <description>NBA 2K sparks the AAA game price hike conversation. Ninja streams to YouTube without a contract. And Destiny 2's Twitch plugin breaks site-wide subtrain records for big streamers.</description>
            <guid>fd63b88b-2714-43c4-9840-d2dc247dda33</guid>
            <pubDate>Sun, 12 Jul 2020 14:50:59 GMT</pubDate>
            <!-- iTunes Specifics -->
            <itunes:duration>42:57</itunes:duration>
            <itunes:episodeType>full</itunes:episodeType>
            <itunes:episode>1</itunes:episode>
            <itunes:season>1</itunes:season>
            <itunes:explicit>no</itunes:explicit>
        </item>
        
        <!-- Episode 2 -->
        <item>
            <title>Are Gamers Tired of Battle Royales?</title>
            <enclosure url="https://www.mobomu.com/podcasts/entitlegamers/audio/episode-002.mp3"
                       length="96854827" type="audio.mpeg"/>
            <description>Ubisoft's HyperScape is a new Battle Royale game that resurfaces the age-old "gamers are tired of this genre" conversation, but are they really?</description>
            <guid>33bdc13a-8c1a-430e-a7c3-709b0d1928e4</guid>
            <pubDate>Sun, 19 Jul 2020 17:00:00 GMT</pubDate>
            <!-- iTunes Specifics -->
            <itunes:duration>40:21</itunes:duration>
            <itunes:episodeType>full</itunes:episodeType>
            <itunes:episode>2</itunes:episode>
            <itunes:season>1</itunes:season>
            <itunes:explicit>no</itunes:explicit>
        </item>
    </channel>
</rss>

Edit 2: Thanks to the help of kjhughes below I was able to solve the error in my RSS tag (it was a typo) and then w3 was able to find a whole lot more errors in my code which once they were all fixed it validated. I'll post the validated RSS feed code for reference for anyone else who may be having similar issues:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
     xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <!-- Main Information -->
        <title>Entitled Gamers</title>
        <description>Two friends and streamers SamuraiHerc and PoopShizzle get together once a week to chat about what's new and trending in gaming, streaming, and content creating.</description>
        <link>https://www.mobomu.com/podcasts/entitledgamers/entitledgamers.html</link>
        <image>
            <title>Entitled Gamers</title>
            <link>https://www.mobomu.com/podcasts/entitledgamers/entitledgamers.html</link>
            <url>https://www.mobomu.com/podcasts/entitledgamers/img/cover.jpg</url>
        </image>
        <atom:link href="https://www.mobomu.com/podcasts/entitledgamers/rss/feed.xml" rel="self" type="application/rss+xml" />
        <!-- Optional Information -->
        <language>en-US</language>
        <copyright>Copyright 2020, Mobomu Gaming Network</copyright>
        <managingEditor>poopshizzle@mobomu.com (PoopShizzle)</managingEditor>
        <webMaster>herc@mobomu.com (SamuraiHerc)</webMaster>
        <!-- iTunes Specifics -->
        <itunes:author>Mobomu</itunes:author>
        <itunes:owner>
            <itunes:name>Mobomu</itunes:name>
            <itunes:email>entitledgamers@mobomu.com</itunes:email>
        </itunes:owner>
        <itunes:image href="https://www.mobomu.com/podcasts/entitledgamers/img/cover.jpg"/>
        <itunes:category text="Leisure">
            <itunes:category text="Video Games" />
        </itunes:category>
        <itunes:category text="Comedy" />
        <itunes:category text="News">
            <itunes:category text="Entertainment News" />
        </itunes:category>
        <itunes:summary>Two friends and streamers SamuraiHerc and PoopShizzle get together once a week to chat about what's new and trending in gaming, streaming, and content creating.</itunes:summary>
        <itunes:type>episodic</itunes:type>
        <itunes:explicit>clean</itunes:explicit>

        <!-- Episode 1 -->
        <item>
            <title>Games are Getting More Expensive?</title>
            <enclosure url="https://www.mobomu.com/podcasts/entitledgamers/audio/episode-001.mp3"
                       length="103132759" type="audio/mpeg"/>
            <description>NBA 2K sparks the AAA game price hike conversation. Ninja streams to YouTube without a contract. And Destiny 2's Twitch plugin breaks site-wide subtrain records for big streamers.</description>
            <guid isPermaLink="false">fd63b88b-2714-43c4-9840-d2dc247dda33</guid>
            <pubDate>Sun, 12 Jul 2020 14:50:59 GMT</pubDate>
            <!-- iTunes Specifics -->
            <itunes:duration>42:57</itunes:duration>
            <itunes:episodeType>full</itunes:episodeType>
            <itunes:episode>1</itunes:episode>
            <itunes:season>1</itunes:season>
        </item>
        
        <!-- Episode 2 -->
        <item>
            <title>Are Gamers Tired of Battle Royales?</title>
            <enclosure url="https://www.mobomu.com/podcasts/entitlegamers/audio/episode-002.mp3"
                       length="96854827" type="audio/mpeg"/>
            <description>Ubisoft's HyperScape is a new Battle Royale game that resurfaces the age-old "gamers are tired of this genre" conversation, but are they really?</description>
            <guid isPermaLink="false">33bdc13a-8c1a-430e-a7c3-709b0d1928e4</guid>
            <pubDate>Sun, 19 Jul 2020 17:00:00 GMT</pubDate>
            <!-- iTunes Specifics -->
            <itunes:duration>40:21</itunes:duration>
            <itunes:episodeType>full</itunes:episodeType>
            <itunes:episode>2</itunes:episode>
            <itunes:season>1</itunes:season>
        </item>
    </channel>
</rss>


Solution

  • In general

    All XML namespace prefixed in use must be declared.

    Specifically, every XML element name in the document with the form,

    nspref:LocalName
    

    must be declared like this

    xmlns:nspref="http://example.com/ns"
    

    at that element or its ancestors for the nspref namespace prefix.


    In your case

    There is a typo in one of the namespace declarations:

     xmnls:spotify="https://www.spotify.com/ns/rss"
       ^^
    

    should be

     xmlns:spotify="https://www.spotify.com/ns/rss"
       ^^
    

    And, yes, after resolving such an issue, others may be uncovered.