KMZ File - Parse Error(s)

2,616 views
Skip to first unread message

LW

unread,
Aug 25, 2009, 12:18:06 PM8/25/09
to KML Developer Support - Advanced Support for KML
I have a GE project I'm working on - have been for 4 months now, and I
don't want to lose my work! I'm hoping someone can help...

I'm getting:

//".....parse error at line 11708: column 2" -
mismatched tag//

I've been copying/pasting HTML code manually to the placemark
"Description" fields (to make cool pop-up windows), and I've obviously
made an error in the code. While I do read HTML and can fix the code,
I can't open the file (3M+). I'm on a pared-down MacBook and I have no
idea how to even open the file to go fix it.

If someone can take a look at Charleston_Hazardous1.kmz, or else clue
me in on an editor with error checks, I would greatly appreciate it!!!

L

LW

unread,
Aug 25, 2009, 12:23:09 PM8/25/09
to KML Developer Support - Advanced Support for KML
BTW, I did make backup copies and I did save all my places to
MyPlaces.KML - all have the same error....but if I fix one, I fix them
all...

Nymor

unread,
Aug 25, 2009, 9:05:07 PM8/25/09
to KML Developer Support - Advanced Support for KML
Hi,

Had a look and managed to fix it for you.

I've seen this before and it's to do with the lines

//<![CDATA[
//]]>

which occur 4 times in your file and for some reason - which I'm sure
someone will be able to explain - the inclusion of these causes
problems. It's not just GE that thinks there are mismatched tags but
all NotePad++ which I used to fix it. As the lines are //'ed out it
shouldn't matter that they are removed.

I've uploaded 2 files - one the fixed KMZ
(Charleston_Hazardous1_Fixed.kmz) and another, a text file, that lists
the changes made (Charleston_Hazardous_changes.txt).

To fix these types of errors yourself should it happen again - extract
the doc.kml from the kmz (just unzip the kmz with a zip programme as
kmz is just a zipped file) and then open the doc.kml is a text editor
and go to the line that errors and have a look..

I use NotePad++ but I don't think that's available on the MAC so
you'll have to find an equilavent app. Also look for a text editor
that will highlight syntax for different languages - with N++ it was
fairly straightforward to find the lines that needed changing as
different content is highlighted in different colours.

Anyway hope the uplloaded KMZ works for you - I tried it and it seems
ok.

Regards
Nymor

LW

unread,
Aug 26, 2009, 2:30:48 PM8/26/09
to KML Developer Support - Advanced Support for KML
THANK YOU SO MUCH, Nymor!! You've saved my project!!

As you can see when you open it, it has some really important info for
the public, so I can't thank you enough. It's been years since I did
code debugging, so thanks for the info - l'll go find an editor for
the Mac and use your instructions.

Thanks to you, and thanks for all the people out there helping us GE
noobs :D.

L

Nymor

unread,
Aug 27, 2009, 2:16:14 AM8/27/09
to KML Developer Support - Advanced Support for KML
A pleasure LW - glad to help out :)

With ref to text editors for the MAC this thread
http://www.maclife.com/forums/topic/103528
seems to have a few options in it that sound like equivalents to N++.
Any MAC users out there wish to chip in with their favourites?

Nymor

Steve Poulsen

unread,
Nov 26, 2013, 12:01:22 PM11/26/13
to kml-suppor...@googlegroups.com
Nymor,

I have a kmz file that gives me the following error when I try to open it:

Open of file "/Users/gamedaytest1/Desktop/NHL Winter Classic 2014 11.26.13 v2.kmz" failed: Parse error at line 4251, column 18:

not well-formed (invalid token)


This file represents months of work that I greatly need.  Can you help?


Legal Notice:  This message is intended for the addressee(s) only and, unless expressly stated otherwise, is confidential and may be privileged.  If you are not an addressee, (i) please inform the sender immediately and permanently delete and destroy the original and any copies or printouts of this message, and (ii) be advised that any disclosure, copying or use of the information in this message is unauthorized and may be unlawful.

Jason M

unread,
Nov 26, 2013, 9:04:10 PM11/26/13
to kml-suppor...@googlegroups.com
Hi Steve,
 
Here are some steps to repair a corrupted KML file.
 
You'll need to first uncompress the root KML file from the KMZ (simply rename .kmz file to .zip) then try to fix the KML file.
 
Next you'll need a text editor that is preferably XML-aware or at least can show line numbers.

Daniel Iffrig

unread,
Jul 13, 2014, 4:05:19 PM7/13/14
to kml-suppor...@googlegroups.com
Jason M,

I have the same issue as above, parsing error with "not well-formed" invalid token. However, I am unable to rename the file .zip or .rar in efforts to change the file type. Am I missing something obvious? I'd like to do this myself, but I've got no idea how to fix this file if it will not rename. It is kinda strange that this happened just after adding a couple of points into google earth. It would make more sense if this happened while editing code in google earth, but I don't know anything about coding.

My file is attached.
MSDProjects.kmz
MSDProjects.rar.rar

Jason M

unread,
Jul 14, 2014, 4:07:56 PM7/14/14
to kml-suppor...@googlegroups.com
The MSDProjects.kmz file isn't a ZIP file so don't know what to say about that. The RAR file appears to be a RAR archive data, v1d, os: Win32.

You need to follow the steps to create a valid KMZ file which is just a standard ZIP-compatible file renamed to .kmz.

You should probably first get the raw KML and get that working first then when it's working in Google Earth just save it as a KMZ file directly from Google Earth.

Hope that helps.

Rufftgeo

unread,
Jul 15, 2014, 10:39:09 AM7/15/14
to kml-suppor...@googlegroups.com
Hi Jason,

I am receiving the same problem. I have tried changing the file to a zip document but am unaware of the method to opening the file and fixing the coding. The website you have attached is very informative but I don't know where to start honestly.The zip files were created after the KML files would not open in google earth. I created another attempt of the KMZ file. I really appreciate any guidance. 

I have attached the documents below.
Pacels_Wood3.kmz
Woodland_Parcels_Select.zip
Woodland_Parcels.zip

Rufftgeo

unread,
Jul 15, 2014, 3:13:42 PM7/15/14
to kml-suppor...@googlegroups.com
If I create a layer in GIS of point features at the center of the polygons I am able to open it in google earth. If there is any help that anyone can provide I would truly appreciate being able to have the polygon features in google earth. I am looking to correct parse error displayed in two files.

Thank you

Jason M

unread,
Jul 15, 2014, 9:33:35 PM7/15/14
to kml-suppor...@googlegroups.com
If you unzip the KMZ file ( Pacels_Wood3.kmz) you'll notice the '<' character in the Document id attribute. This make this an invalid XML file. It's not properly escaped.

<?xml version="1.0" encoding="UTF-8"?>
LSchema-instance"
<Document id="<70&#37; Woodland Parcels">
...

Edit the id field and change it to id="Woodland Parcels".

You can find some simple steps to validate a KML file here.
Reply all
Reply to author
Forward
0 new messages