I am fairly new to XML so this may be something basic I have done wrong.
I am creating a sitemap in xml for a customer's site but I am having problems with a parser error where google webmaster central can't read the file.
I have validated the XML at Validome and I get this error message: Error (1) File name: sitemap.xml Error: Prefix "image" for element "image:image" is not bound. Error Postion: <image:image>
Here is an example section of my code: (I have replaced the domain witha generic name for privacy) <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 [sitemaps.org...] <url> <loc>http://www.example.com/index.html</loc> <lastmod>2011-04-15T11:37:04+00:00</lastmod> <changefreq>monthly</changefreq> <priority>0.80</priority> <image:image> <image:loc>http://www.example.com/images/map.gif</image:loc> <image:caption>Location Map</image:caption> <image:title>Map</image:title> </image:image> </url> </urlset>
Any help would be much appreciated
[edited by: httpwebwitch at 7:24 pm (utc) on Apr 25, 2011] [edit reason] use example.com for examples, with exception for sitemaps.org [/edit]
it's not required, nor allowed. You may be confusing a sitemap with an RSS feed, which does have image nodes and other metadata. Sitemaps are more sparse.
The sitemap lists URLs of pages - HTML/XML pages - that you want someone to visit and index. Bots that index images will do so when they download the page and grab all the <img> references in it.
Honestly I don't know what would happen if you put an image URL in a <loc>. Everything you need to know about sitemaps is explained at sitemaps.org; if it's not mentioned there it's not necessary and probably not recommended. Most webmasters will include images on pages, allow the pages to be indexed, and that works just dandy.