Home   Profile   Fun
#14 Linux  03.04.2007

How to validate a Google Sitemap


There is an easy and fast way to accomplish this. Libxml2 is the XML C parser and toolkit of Gnome (http://xmlsoft.org/). If libxml2 is installed on your system you can use the command line tool xmllint to validate your google sitemap. This is done by validating your sitemap file against the Google Sitemap XML schema. Here are two examples:

Download the XML schema from http://www.google.com/schemas/sitemap/0.84/sitemap.xsd and run
xmllint --schema sitemap.xsd yoursitemap.xml

Or fetch the schema directly from Google
xmllint --schema http://www.google.com/schemas/sitemap/0.84/sitemap.xsd yoursitemap.xml

Some useful options
--help
--debug