I've been working on a project to combine multiple kml files into a
single kmz file. In doing so, I had problems getting Google Earth to
read the doc.kml file within the main kml (it was reading one of the
kml files within the sub-folders instead). It turns out that the way I
was zipping the kml was putting the doc.kml file at the end of the
main directory listing. Changing the zip order to make the the doc.kml
be the first file fixed the problem. So using the command-line zip
utility in linux:
zip -r file.kmz kmls/ doc.xml
does not work, while
zip -r file.kmz doc.xml kmls/
does work.
It seems that Google Earth is not only looking in the top-level
directory for the first .kml file, as stated in the documentation, but
looks in the sub-folders as well, doing so before looking at the rest
of the top-level directory files.
Here's the doc reference:
http://code.google.com/apis/kml/documentation/kmzarchives.html