WordPress XML ParseError: unbound prefix? WordPress XML ParseError: unbound prefix? wordpress wordpress

WordPress XML ParseError: unbound prefix?


Apologies to everyone for whom this was stupidly obvious, but it turns out I simply didn't have a namespace definition for "atom" in the document. I'm guessing that "unbound prefix" means that the prefix "atom" wasn't "bound" to a namespace definition?

Anyway, adding said definition has solved the problem. Although it makes me wonder why WordPress exports XML files without proper definitions for all of the namespaces they use...


If you remove all the Name Space, works absolutely fine.

Change

<s:home>USA</s:home>

to

<home>USA</home>


Just in case it helps someone some day, I was also working with a WordPress XML export (WordPress eXtended RSS) file in Python and was getting the same error. In my case, WordPress had included most of the correct namespace definitions. However, the XML had iTunes podcast information as well, and the iTunes namespace declaration was not present.

I fixed it by adding xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" into the RSS declaration block. So this:

<!-- generator="WordPress/4.9.8" created="2018-08-06 03:12" --><rss version="2.0"    xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"    xmlns:content="http://purl.org/rss/1.0/modules/content/"    xmlns:dc="http://purl.org/dc/elements/1.1/"    xmlns:wp="http://wordpress.org/export/1.2/">

became this:

<!-- generator="WordPress/4.9.8" created="2018-08-06 03:12" --><rss version="2.0"    xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"    xmlns:content="http://purl.org/rss/1.0/modules/content/"    xmlns:dc="http://purl.org/dc/elements/1.1/"    xmlns:wp="http://wordpress.org/export/1.2/"    xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">