}
}
public static void main(String[] args) {
// NOTE: KmlFactory does _not_ use kmldom.
KmlFactory factory = KmlFactory.GetFactory();
// <coordinates>1,2</coordinates>
Coordinates coordinates = factory.CreateCoordinates();
coordinates.add_latlng(37.0, -122.0);
// <Point id="pt0">...
Point point = factory.CreatePoint();
point.set_id("pt0");
point.set_coordinates(coordinates);
// <Placemark id="pm123"><name>my place</name>...
Placemark placemark = factory.CreatePlacemark();
placemark.set_name("my placemark");
placemark.set_id("pm123");
placemark.set_geometry(point);
// <kml>...
Kml kml = factory.CreateKml();
kml.set_feature(placemark);
// NOTE: this _requires_ kmldom.
System.out.print(kmldom.SerializePretty(kml));
}