Comments

DrupalKing’s picture

sorry, should have used this for the code:


    * warning: XMLReader::read() [xmlreader.read]: /var/www/html/BASC/testsite/sites/default/files/wordpress/wordpress.2010-07-12(2).xml:22658: parser error : Opening and ending tag mismatch: encoded line 0 and script in /var/www/html/BASC/testsite/sites/all/modules/wordpress_import/wordpress_import.module on line 1424.
    * warning: XMLReader::read() [xmlreader.read]: // ]]></script><a href="mailto:info@brainandspinalcord.org">info@brainandspinalc in /var/www/html/BASC/testsite/sites/all/modules/wordpress_import/wordpress_import.module on line 1424.
    * warning: XMLReader::read() [xmlreader.read]: ^ in /var/www/html/BASC/testsite/sites/all/modules/wordpress_import/wordpress_import.module on line 1424.
    * warning: XMLReader::read() [xmlreader.read]: An Error Occured while reading in /var/www/html/BASC/testsite/sites/all/modules/wordpress_import/wordpress_import.module on line 1424.
    * This file does not appear to be a valid WXR file. The file is either corrupted or invalid XML. In some versions of WordPress, the export function can produce malformed XML. Please see README.txt (included in the module archive) for further guidance.
yan’s picture

I'm getting this with a WordPress 2.9.2 export:

# warning: XMLReader::read(): /tmp/wordpress.2010-07-14.xml:4233: parser error : Opening and ending tag mismatch: encoded line 4224 and script in /home/xxx/www/d6/sites/all/modules/wordpress_import/wordpress_import.module on line 1424.
# warning: XMLReader::read(): // ]]>
yan’s picture

I solved my problem by deleting some javascript from two articles of the original source.

lavamind’s picture

Assigned: Unassigned » lavamind
Status: Active » Postponed (maintainer needs more info)

I would need to examine your Wordpress export file to determine what's going on here.

ParisLiakos’s picture

i had the same error:

   * warning: XMLReader::read(): /var/www/drupal/sites/default/files/wordpress/wordpress.2010-12-04.xml:12873: parser error : Opening and ending tag mismatch: encoded line 12873 and script in /var/www/drupal/modules/wordpress_import/wordpress_import.module on line 1424.
    * warning: XMLReader::read(): _u").src=sb_hp+"://loc1.hitsprocessor.com/sp/widget-external.js";}//]]> in /var/www/drupal/modules/wordpress_import/wordpress_import.module on line 1424.
    * warning: XMLReader::read(): ^ in /var/www/drupal/modules/wordpress_import/wordpress_import.module on line 1424.
    * warning: XMLReader::read(): An Error Occured while reading in /var/www/drupal/modules/wordpress_import/wordpress_import.module on line 1424.
    * This file does not appear to be a valid WXR file. The file is either corrupted or invalid XML. In some versions of WordPress, the export function can produce malformed XML. Please see README.txt (included in the module archive) for further guidance.

Sorry i cant attach XML file here its bigger than 1mb.
if you want it though i can make it available through an external link

lavamind’s picture

@parisz: Yes if you can provide the file either here or via an external link, it would help.

rodneykgary’s picture

I am getting the same error message as above as well.

I have loaded my file to the following site to view.

https://files.me.com/rodneykgary/5i6dtw

ParisLiakos’s picture

i solved this..i started importing by month and that helped me locate the problem.
It was indeed Opening and ending tag mismatch thanks to blogger's/wordpress awfully bad-written code.
Anyone having this error,open the xml file with a nice html editor so you can see the tags opening/closing.Then locate the mismatches/bad closures (it will be near the lines that error points)and fix them.
i fixed the tags and import worked as charm!

Thanks

lavamind’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

PHP's XML Reader, which is used in Wordpress Import, doesn't really tolerate bad XML.

However you don't have to look everywhere in your file to find the problem. In the first line of the error message, the problematic line number is output. Example : parser error : Opening and ending tag mismatch: encoded line 12873. So you just need to open a text editor and jump to the line indicated here and fix the XML problem.