Google xml sitemap stylesheet loading error

If you’re using google xml sitemap wordpress plugin(Google sitemap generator,google-xml-sitemaps-v3-for-qtranslate,..etc), you will notice an error message when you’re accessing your sitemap.This error message like this.
Google XML Sitemap Stylesheet loading Error

The main reason is this plugin can’t access directly sitemap.xsl or it not exist in the directory.The sitemap.xsl file is design your sitemap.xml file.It not essential to sitemap.xml file.
Another reason is your security plugins may not directly access this sitemap.xsl file for security reasons.
You can follow these any mothod to slove this problem.
[stextbox id=”info”]You definitely need an XML Sitemap. In my personal experience with SEO, Google, and small business websites, XML Sitemaps have been an invaluable tool. Most people don’t know what Sitemaps are and often pay others to do SEO work – this is an advantage for you over your competition. One of my SEO “secrets” is to install the XML Google Sitemaps Plugin in my websites. I usually see results within a few days from using that Sitemap plugins![/stextbox]


1-Go to the /wp-content/plugins/google-sitemap-generator folder.
2-Open the sitemap-core.php file.
3-Find the following function and full comment or remove it.

	function GetDefaultStyle() {
        $p = $this->GetPluginPath();
        if(file_exists($p . "sitemap.xsl")) {
            $url = $this->GetPluginUrl();
            //If called over the admin area using HTTPS, the stylesheet would also be https url, even if the blog frontend is not.
            if(substr(get_bloginfo('url'),0,5) !="https" && substr($url,0,5)=="https") $url="http" . substr($url,5);
            return $url . 'sitemap.xsl';
        return '';

4-Add this function after above.