This object is in archive! 

"Problem with file" on trying to import a KML file from the web

Kake shared this problem 10 years ago
Solved

When I try to import this file: http://the.earth.li/~kake/misc/soft-p... Locus Pro pops up an orange box saying "Problem with file [temporary-looking-filename].kml!" and refuses to import it. How can I get it to tell me what it doesn`t like about the file?

Replies (6)

photo
0

dont know what`s wrong with kml,


(I have to look up later)


but...


- open this kml in Google Earth


- save places as kmz


- import this new kmz in Locus


works


Files: shot.png
photo
0

Thanks, that worked! It would be good to have a proper solution, though, since I regenerate this file fairly often and I`d like to be able to have the most recent version on my phone without going through the faff of resaving it in Google Earth.

photo
0

sure, but later...


I`m still in the office ;)

photo
0

Hello guys,


answer is simple, your file is invalid!


in <description> tags are HTML tags that cannot be there. If you want to insert any of invalid characters as text into XML (KML, GPX, ...) file, you have to "escape" them by using <[CDATA[ .... ]]> syntax.


Like (just remove ` symbol, I wasn`t able to write it without ...)


<`description><[CDATA[... your text ...]]></description>


If there will be problem or my description too short, write me, I`ll try to explain it better ..


@gynta: beware of your boss. Hmm, aren`t You the boss? :)

photo
0

Hurrah, thanks, that fixed it!


Would it be possible to change the error message to be more specific? i.e. if the problem is that the file is invalid, could it say "file is not valid KML" rather than just "Problem with file"?

photo
0

Unfortunately not ... I`m using XML parser that unfortunately just "crash" with no error message in it. So I`m unable to discover directly in Locus where was problem. I agree that this should be really useful, but ...


Anyway glad it works now!

Replies have been locked on this page!