Download Google Earth

Validating KML As You Go

To use some of KML's more advanced features (such as, Region, TimeSpan/TimeStamp and ScreenOverlay), you must author the KML in a text editor. You can use a basic text editor, such as Notepad (Windows) or TextEdit(Mac OS X), however, basic text editors don't provide error-checking. That means that you won't discover mistakes until you try to open the file in Google Earth and receive a parse error.

jEdit is an open-source, Java-based text editor that works on Windows, Mac OS X and Linux. Using a few additional plug-ins, jEdit provides as-you-type error checking to ensure that your KML is well-formed and validates against the official KML schema. This tutorial will show you how to set-up jEdit for editing KML and demonstrate some of its error-checking abilities.

 

Why Use a Validating Editor? (video)

This very short video demonstrates the iterative process of editing KML with a basic text editor vs. jEdit. Note: this video does not have sound.


Using jEdit to Validate KML as You Go

 

Before You Start

  1. Install the Java Runtime Environment.

    Go to http://www.java.com and click Free Java Download.

  2. Install the latest stable version of jEdit.

    Go to http://www.jedit.org and click Download link at the upper right. Be sure to install version 4.2 or the latest stable build of jEdit for your operating system.

    Note: Although you can try installing the latest development build of jEdit, there are some issues on Windows with jEdit 4.3pre9 and the plug-ins required for this tutorial.

  3. Right-click and Save these files to you desktop:

    download kml GGB.kml: A simple placemark at the Golden Gate Bridge
    download kml schema_header.txt: A modified <kml> tag with references to the KML 2.1 Schema

    These files are used in the video tutorial. You can watch the tutorial and then try editing the files yourself.

The following videos show you how to set up jEdit plug-ins to work with XML files and how to properly reference the KML 2.1 schema, so that your documents are validated as you type.

 

Setting up jEdit Plugins to Validate KML (video)

Summary: Set up the jEdit plugins required for this tutorial.


 

Using jEdit to Validate KML as You Go (video)

Summary: Link your document to the KML schema and practice correcting XML errors and invalid KML.

 

Discussion/Feedback

Have questions about this tutorial? Want to give us some feedback? Visit the Google Earth Outreach Discussion Group to discuss it with others.

 

What's Next?

Want to test out your new skills? Take a look at these other tutorials that require some hand-editing of KML: