Title: Update to version 4.0.3 &#8211; XML Error
Last modified: August 21, 2016

---

# Update to version 4.0.3 – XML Error

 *  Resolved [3Lancer](https://wordpress.org/support/users/3lancer/)
 * (@3lancer)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/update-to-version-403-xml-error/)
 * After updating from 4.0.2 to 4.0.3 and recreating the sitemap, I got the following
   parsing error on all the generated XMLs.
 *     ```
       XML Parsing Error: XML or text declaration not at start of entity
       Location: (domain)/sitemap.xml
       Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="(domain)/wp-content/plugins/google-sitemap-generator/sitemap.xsl"?><!-- generator="wordpress/3.8.2" -->
       ^
       ```
   
 * I’m curious if it’s due to being line 2, rather than line 1? But the code wasn’t
   modified and I reattempted a reinstall of the plugin with the same results. I
   also updated to using PHP 5.4.26 around the same time, if that matters. Any ideas?
 * I attempted to resolve a backup copy of the version 4.0.2 for the plugin. This
   now has resulted in the error on those sitemaps:
 *     ```
       XML Parsing Error: No element found
       Location: (domain)/sitemap.xml
       Line Number 1, Column 1:
       ^
       ```
   
 * Quickly followed by:
 *     ```
       Content Encoding Error
   
       The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
       ```
   
 * I am using GZip Compression, but it was working fine before.
 * I believe the update has messed with the ‘.htaccess’ file?
 * [https://wordpress.org/plugins/google-sitemap-generator/](https://wordpress.org/plugins/google-sitemap-generator/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [3Lancer](https://wordpress.org/support/users/3lancer/)
 * (@3lancer)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/update-to-version-403-xml-error/#post-4804749)
 * Rolling back the PHP version didn’t help either.
 * However, might be unrelated to this plugin…
 * RESOLVED: I added a ‘wejnswpwhitespacefix.php’ to the WordPress ‘index.php’ to
   clean up that new line at the top of the sitemap.xml and feeds. Started working
   again, then the update also seems to of worked. Have yet to hunt down where that
   new line came from, causing the issue.
 *  Thread Starter [3Lancer](https://wordpress.org/support/users/3lancer/)
 * (@3lancer)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/update-to-version-403-xml-error/#post-4804750)
 * I believe this isn’t any issue of the plugin, unless it introduced that white
   space, however it was probably more likely something I did or it could be another
   plugin. In that case, you probably can ignore this.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Update to version 4.0.3 – XML Error’ is closed to new replies.

 * ![](https://ps.w.org/google-sitemap-generator/assets/icon-256x256.png?rev=2713572)
 * [XML Sitemap Generator for Google](https://wordpress.org/plugins/google-sitemap-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-sitemap-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-sitemap-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-sitemap-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-sitemap-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-sitemap-generator/reviews/)

## Tags

 * [Blank](https://wordpress.org/support/topic-tag/blank/)
 * [fail](https://wordpress.org/support/topic-tag/fail/)
 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * 2 replies
 * 1 participant
 * Last reply from: [3Lancer](https://wordpress.org/support/users/3lancer/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/update-to-version-403-xml-error/#post-4804750)
 * Status: resolved