tags:

views:

17

answers:

2

Hello,
I have followed the sitemap standards specified in the following sites while building the sitemap for my site.
1.http://www.wordsinarow.com/xml-sitemaps.html
2.The google webmaster central: 3.Sitemap protocol:

The sitemaps are generated in XML format and posted to the website http://validator.w3.org/ for validation. The two input methods used for validating a sitemap are Validate by File Upload and Validate by direct input In both the methods the sitemap XML file passes all the tests for being a well-formed XML document but the site raises 2 warnings which are as below,

No DOCTYPE found! Checking XML syntax only.
The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax, or that your XML document is not using a DOCTYPE Declaration. Validation of the document has been skipped, and a simple check of the well-formedness of the XML syntax has been performed instead.

If we want to add the doctype in the xml sitemap as specified inhttp://validator.w3.org/docs/help.html#faq-doctype the document needs to be in XHTML format as below,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>

      <title>Title</title>
    </head>

    <body>
      <!-- ... body of document ... -->
    </body>

  </html>

Please guide me if there is any other direction in which I should proceed to find the solution.

A: 

The W3C validator doesn't validate XML. Try opening the XML file in a web browser and you'll discover any validation errors that way.

Skilldrick
thanks moontear and Skilldrick
Madhu
will follow your instructions :)
Madhu
A: 

You do not need to submit your site to the W3C validator as it doesn't validate XML anyways (XML is different than XHTML). You can open the XML file with your webbrowser though to see any errors (or try this XML validator or this one)

The best way is just to submit your XML to Google Webmaster and see if Google accepts it, otherwise it will tell you that there are errors in your sitemap. A more complete definition of the sitemap xml is shown on http://www.sitemaps.org/protocol.php.

If you have problems creating the sitemap manually try a free online generator to get you started (and modify the created XML manually afterwards): http://www.xml-sitemaps.com/

moontear