Start by separating a damaged file from an unsupported import. KML is an XML-based map format; KMZ packages a KML document and related resources. A viewer rejecting a file does not, by itself, tell you which part is wrong.
Preserve the evidence
Keep the source file and the exact import error. Work on a copy so that a repair can be compared with the original.
- Confirm the download completed and the file is not empty.
- Check whether the file extension matches its actual contents; renaming another format to .kml does not convert it.
- Record the destination application and whether the same copy opens in another compatible viewer.
Check structure, coordinates and resources
A parse error usually calls for structure review. A map in the wrong place calls for a coordinate review. Missing icons or overlays call for a resource check.
- Look for malformed XML, namespaces and references to absent IDs.
- KML coordinate tuples use longitude, latitude, and optional altitude; check that the order and values are meaningful.
- For KMZ, check the contained KML document and the relative paths to included images or resources.
- Do not guess a replacement coordinate or recreate a missing resource without a reliable source.
Review a repair with KML Doctor
KML Doctor checks files locally on Mac, shows issue locations and separates safe changes from suggestions that need review.
- Open a file or a folder of KML/KMZ files.
- Inspect the reported structure, geometry, styles and resource issues.
- Apply only repairs whose meaning you understand; leave ambiguous data for manual review.
- Save the corrected file as a separate copy and re-run the check.
- Import the copy into the target viewer and inspect the map, labels and geometry.
A useful reference check
If an object references #routeStyle but no style with that ID exists, first look for the intended style in the source export. Changing it to a random existing style may hide the warning while changing the map. A successful import is only one part of validation.
- Check object counts and coordinates against the original.
- Review remaining warnings and keep the report with the repaired copy.
- Use the destination viewer’s documentation when it rejects a feature that is valid KML.
Sources and product details
Frequently asked questions
Can every broken KML file be repaired automatically?
No. Ambiguous coordinates, missing resources and unsupported viewer features may require manual decisions.
Does a KMZ import failure mean the archive is corrupt?
No. It can also be a resource path, KML structure or viewer compatibility issue.
Does KML Doctor overwrite the original?
No. The corrected output is saved as a separate copy; keep the original for comparison.