Error: Missing Namespace
Problem:
The first requirement for a valid KML file is that it includes a namespace declaration for the KML namespace on the root <kml> element.
All KML files reside within a particular namespace however the KML Validator only validates OGC KML 2.2, and not older Google KML:
- the namespace for KML 2.1 is "http://earth.google.com/kml/2.1"
- the namespace for KML 2.2 is "http://earth.google.com/kml/2.2"
- the namespace for OGCKML 2.2 is "http://www.opengis.net/kml/2.2"
If the KML file does not include a namespace declaration, the KML Validator will insert the correct namespace before validating the file.
Solution:
Make sure that the KML file includes the namespace declaration for the current version of the OGC KML Standard.
Add the following to the root element of the KML file:
xmlns="http://www.opengis.net/kml/2.2"
Additional References:
See one of the following resources for more help on namespaces:
- http://www.sitepoint.com/article/xml-namespaces-explained
- http://www.w3schools.com/xml/xml_namespaces.asp
- http://www.xml.com/pub/a/1999/01/namespaces.html

