[wp-trac] [WordPress Trac] #27896: wordpress-importer's lack of understanding of XML Namespaces causing compatibility issues

WordPress Trac noreply at wordpress.org
Fri Apr 18 15:02:19 UTC 2014


#27896: wordpress-importer's lack of understanding of XML Namespaces causing
compatibility issues
--------------------------+-----------------------------
 Reporter:  tomdxw        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Import        |    Version:  3.9
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This plugin doesn't understand namespaces when parsing XML.

 Correct me if I'm wrong but I think 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).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27896>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list