WordPress.org

Forums

WordPress Importer
Plugin's lack of understanding of XML Namespaces causing compatibility issues (1 post)

  1. tomdxw
    Member
    Posted 1 year ago #

    This plugin doesn't understand namespaces when parsing XML.

    The following XML documents are equivalent:

    <rss xmlns:wp="http://wordpress.org/export/1.2/">
      <channel>
        <wp:wxr_version>1.2</wp:wxr_version>
      </channel>
    </rss>
    <rss>
      <channel>
        <wxr_version xmlns="http://wordpress.org/export/1.2/">1.2</wxr_version>
      </channel>
    </rss>
    <rss>
      <channel>
        <wp:wxr_version xmlns:wp="http://wordpress.org/export/1.2/">1.2</wp:wxr_version>
      </channel>
    </rss>
    <rss xmlns:ns1="http://wordpress.org/export/1.2/">
      <channel>
        <ns1:wxr_version>1.2</ns1:wxr_version>
      </channel>
    </rss>

    Importing the first document leads to the next step with the "Download and import file attachments" checkbox and the "Submit" button. The other documents produce "This does not appear to be a WXR file, missing/invalid WXR version number".

    This bug makes it difficult to write tools which generate WXR files (for instance when migrating content from an existing site into a WordPress installation).

    Thanks,
    Tom Adams
    dxw

    https://wordpress.org/plugins/wordpress-importer/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Importer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.