[wp-trac] Re: [WordPress Trac] #5460: WXR importer doesn't like XML files with </item><item>

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 27 22:18:27 GMT 2008


#5460: WXR importer doesn't like XML files with </item><item>
--------------------------+-------------------------------------------------
 Reporter:  JeremyVisser  |        Owner:  westi   
     Type:  defect        |       Status:  assigned
 Priority:  low           |    Milestone:  2.9     
Component:  General       |      Version:  2.3.1   
 Severity:  minor         |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by hailin):

 I think the current import code can be improved substantially IF we
 utilize an XML parser such as SimpleXMLElement, which is available in PHP
 5.x.

 Current parsing is line-by-line, and it calls get_entries() three times,
 resulting in three times of line-by-line parsing of the whole input file.

 Besides, the assumption that <item> or <wp:category>(.*?)</wp:category>,
 or <wp:tag>(.*?)</wp:tag>, will always appear in one single line is
 fragile. They may well appear in different lines.

 With an XML parser, we can fix all these potential issues, and improve the
 import speed.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5460#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list