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="[ External links are visible to forum administrators only ]" xmlns:xsi="[ External links are visible to forum administrators only ]" xsi:schemaLocation="[ External links are visible to forum administrators only ] [ External links are visible to forum administrators only ]">

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 #2 on: October 12, 2005, 11:11:13 AM »
Thanks for the reply.
My sitemap is located at [ External links are visible to forum administrators only ]

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)
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 [ External links are visible to forum administrators only ] at [ External links are visible to forum administrators only ]
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.
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 [ External links are visible to forum administrators only ] 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 #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: [ External links are visible to forum administrators only ]

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