XSD Open Geospatial Consortium · 2.2.0

OGC KML 2.2

Keyhole Markup Language

Placemarks, paths and polygons for Google Earth and other map viewers.

About

KML became an OGC standard with version 2.2. The schema imports the Atom author/link elements and the OASIS xAL address schema, both included here.

Good to know

  • Google extensions in the gx: namespace are not part of the OGC schema; documents that use them may be reported invalid.
  • KMZ files are zip archives; unzip and validate the doc.kml inside.

Files

3 files · 137.8 KB

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Example document

placemarks.kml · 553 B · valid against this schema

In CI and from code

The same schema by its name, kml-2.2, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema kml-2.2
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: kml-2.2
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document={{ $schema->example ?? 'document.xml' }} -F schema=kml-2.2

Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups