Parsing Error - no document type declaration
« on: October 11, 2005, 12:29:20 PM »
I'm new to this and recently generated my new sitemap online.
I followed all the instructions, uploaded to my website and submitted it to Google.

I get the following Error.

Sitemap Errors  Parsing error (Line 2)   We were unable to read your Sitemap.
It may contain an entry we are unable to recognise. Please validate your Sitemap before resubmitting.


The first few lines of the code autogenerated online and uploaded were:

<?xml version="1.0" encoding="UTF-8" ?>
- <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">

I try to Validate and get:
Below are the results of attempting to parse this document with an SGML parser.
Error Line 1 column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>".
<html>

Can anyone tell me what should be changed or what to do next?

Thanks
Re: Parsing Error - no document type declaration
« Reply #1 on: October 11, 2005, 02:43:29 PM »
Hi,
please let us know the url of your sitemap to check it.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.
Re: Parsing Error - no document type declaration
« Reply #2 on: October 12, 2005, 11:11:13 AM »
Thanks for the reply.
My sitemap is located at http://www.transam.co.uk/sitemap.xml

At the moment it's a straight "cut and paste" from the code generated online so I don't understand why it's doing this.

Cheers
Nigel
Re: Parsing Error - no document type declaration
« Reply #3 on: October 12, 2005, 12:05:39 PM »
Hi Nigel,
you should NOT copy'n'paste it, but right click at the "Download un-compressed XML Sitemap" link on the "Generated sitemap is ready" page and save it to your computer. Then upload this file to your host.
(since browser renders xml files not "as is", but with inserting of special characters, like "-" for the tree nodes)
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.
Re: Parsing Error - no document type declaration
« Reply #4 on: October 13, 2005, 10:58:06 AM »
OK, thanks.
The "right click save as" option completed and my new sitemap.xml uploaded.
BUT, I tried to validate http://www.transam.co.uk/sitemap.xml at http://validator.w3.org/
and still got the same error as follows?

Try it!


This page is not Valid XML!
Below are the results of checking this document for XML well-formedness and validity.

Error Line 2 column 0: no document type declaration; will parse without validation.
<urlset

Where too from here?
Thanks
Nigel
Re: Parsing Error - no document type declaration
« Reply #5 on: October 13, 2005, 11:54:55 AM »
Hi Nigel,

the service you are referring to DOESN'T validate XML documents (html only):
Quote
This is the W3C Markup Validation Service, a free service that checks Web documents in formats like HTML and XHTML for conformance to W3C Recommendations and other standards.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.
Re: Parsing Error - no document type declaration
« Reply #6 on: October 13, 2005, 12:55:24 PM »
OK, sorry! My fault.
I sort of got to the www.w3 site from Google's help comments about validating your sitemap but obviously didn't understand what I was doing.
Anyway Google has now accepted my sitemap and I'm a happy bunny!

Many thanks for your help.
Re: Parsing Error - no document type declaration
« Reply #7 on: October 13, 2005, 08:16:37 PM »
Glad to hear that, you're welcome :)
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.
Re: Parsing Error - no document type declaration
« Reply #8 on: January 01, 2006, 01:58:56 PM »
Hi,

I have the same problem. I have download the "un-compressed XML Sitemap" and then upload this file to myhost. But wenn a add my site to google it tell "Parsing error (Line 2) " ???

My site is now locatede at: http://www.byvogel.dk/sitemap.xml

Can anyone tell me what should be changed or what to do next?