You are here: FME Readers and Writers > Google KML Reader/Writer > Feature Representation > File Structure

File Structure

KML, like other XML-based formats, can be visualized as a tree structure, where each node in the tree corresponds to an XML element. The root element of a kml file is the <kml> xml element. The <kml> element can contain a <NetworkLinkControl> element, and one other element that inherits from the kml <Feature> type; for practical purposes, the KML writer creates a <Document> element to contain all sub-elements. The KML reader makes no assumptions regarding the contents of the <kml> element.

The <Document> element is a container element that can, in turn contain the following sub-elements:

In addition, the <Document> element can contain the following elements that provide important display and meta-information

<gx:Tour> elements can contain an arbitrary number of <TourPrimative> elements. These include:

With the exception of <Schema> elements, FME maps a fixed schema to each of the aforementioned KML elements; each of the element names map to a well-defined FME feature type. I.e. a feature with a Placemark feature type maps to a <Placemark> kml element.