Jump to content
Sign in to follow this  
devdev

Sitemap

Recommended Posts

hi - having submitted my sitemap to google - the webmaster comes up with a message saying there's a parsing error, suggesting that there's an entry that may not be read. It asks me to validate.

 

what do they mean by this and does it matter? I can see my site online after all

 

 

www.rtls.uk.com/sitemap.xml

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

https://validator.w3.org/

 

Check the first warning "Notes and Potential Issues"

 

The HTTP Content-Type header (text/xml) sent by your web server (Apache) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types

 

It the only thing I can see

Edited by bobbb

Share this post


Link to post
Share on other sites

There are two blank spaces before your first line.

  <?xml version="1.0" encoding="UTF-8" ?> --^

Get rid of those. (And for anyone playing along at home - a blank line with your declaration on the second line will cause a similar error).

 

G.

Share this post


Link to post
Share on other sites

Yes I saw that but in the google link I posted, they say:

Leading whitespace

Your sitemap begins with leading whitespace, rather than a namespace declaration. XML files should begin with the XML declaration that specifies the version of XML being used.

This error won't prevent Google from processing your sitemap, but you might want to remove the whitespace so that the file adheres to the XML standard and you no longer see this error.

It reads to me like just an annoyance you can get rid of.

 

devdev did not mention which error he got. I presumed that if it was this one it would have been fixed. Google also asks to validate the sitemap which I again presume would give more details of the error.

Edited by bobbb

Share this post


Link to post
Share on other sites

I went to www.web-site-map.com which generated his sitemap and submitted his site. It does not generate leading spaces and leading dash and space as in your line 3. So the solution is to download the file exactly as created by www.web-site-map.com and not change it.

 

I looked at the sitemap and now have observations in your what's next post: https://www.cre8asiteforums.com/forums/topic/93789-next-steps/

- <url>
Edited by bobbb

Share this post


Link to post
Share on other sites

 

It reads to me like just an annoyance you can get rid of.

 

Yep. It says it's more of an annoyance, but if you try to load XML in Firefox that has leading white spaces, it is render breaking. (Though there is a possibility that it's my suite of design and dev tools that are actually breaking it - it may not break on a naked Firefox install).

 

Leading white space is an issue in a lot of different parsing and output generation routines. I can't even begin to count the hours I wasted the first time I put myself in that situation. Now, it's one of the first things I check when an application that I'm working on is tossing a parse our output error. Trailing space can be an issue too - though it doesn't usually prevent things from running, it can affect system memory since the stream never gets properly closed and thus it hangs in memory until much later than it should.

 

Anyway - glad we locked in on this. Hopefully it will save devdev some hair pulling.

 

G.

Share this post


Link to post
Share on other sites

 

- it may not break on a naked Firefox install).

It does indeed

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×