Why do i get this error in my sitemap.xml file?”This XML file does not appear to have any style information.”?

I could see all the files display in the document tree that start with <urlset>
?
<url><loc>http://www.mydomainname.com</loc></url>. But sitemap error is still there. Please help. Thanks


2 Responses to “Why do i get this error in my sitemap.xml file?”This XML file does not appear to have any style information.”?”

  • Mark:

    Your urlset element must provide the stylesheet that the xml is validated against and you should also create an xml tag to establish version and encoding

    EXAMPLE:

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

    </urlset>

    NOTE: Yahoo answers is retarded and chops off text for some stupid reason so the full link in the xmlns attribute above is(right-click > copy shortcut/copy link location):

    http://www.sitemaps.org/schemas/sitemap/0.9

    Also.. You might want to verify that your XML is even correct. The code you put in your question does not appear to be valid. I recently did a sitemap for a new site I’m making which you can use as an example; it can be found here:

    http://www.youaremywitnesses.com/sitemap.xml

    If you are opening this in firefox it will say:

    "This XML file does not appear to have any style information associated with it. The document tree is shown below."

    Even if the XML validates properly. This is because XML can be used to make web pages and when that’s done stylesheets are used to tell the browser how to display the data sent in the XML file.

    In the case of our sitemap.xml files though, stylesheets are not needed and that message can be ignored. If you would like to see the entire XML file as it actually is in firefox, you will need to right-click the page and then click ""View page source"

    Hope this helps!

  • melihoe:

    Hello,

    I a couple of quick suggestions. First and the most easiest one is to use a online sitemap generator that will give you a sitemap, no charge, that is properly formatted and you can download.

    Take a look at: http://www.smartfindsmarketing.com/xml_sitemaps.php

    If you want to dig into this problem further, certainly take a look at the formatting information at http://www.sitemaps.org that was created by Google, Yahoo and Microsoft back in 2005 regarding how sitemap files would be setup.

    Unable to post a sample file for you here as it is being re-coded within Yahoo Answers. Hopefully one of the examples above will help you.

Leave a Reply