Locus Map - forum

Support => Troubles & Questions => Topic started by: afx on August 23, 2013, 16:13:30

Title: Convert KML file from Maverick
Post by: afx on August 23, 2013, 16:13:30
Hi,
after Maverick is turning into abandonware I discovered Locus Pro. Nice!
But while it groks the gpx tracks from Maverick just fine, Locus chokes on the KML file with my waypoints (which I'd rather not post...).
Search did not bring me an answer ;-(

thx
afx
Title: Re: Convert KML file from Maverick
Post by: Menion on August 23, 2013, 16:46:04
hi,
  locus has almost full support for KML files (just few specific features is not supported). Unfortunately you have to share some file for test otherwise I'll not be able to find where is problem. or you see some error message appear in Locus?

  You may share file here at public, or just send me it on locus@asamm.com, and I'll quickly check it

  Also suggest to write shortly what you do (how you import this file)
Title: Re: Convert KML file from Maverick
Post by: afx on August 23, 2013, 16:59:37
I import via items->import data and then select the file.
logcat and kml sent via mail.

thx
afx
Title: Re: Convert KML file from Maverick
Post by: Menion on August 24, 2013, 15:39:56
thanks for a file and log

problem is not in Locus, but in file.

You may copy it's content (or whole file) here and check it http://www.xmlvalidation.com/ (http://www.xmlvalidation.com/)

You'll see that there are problems with texts (names). In valid XML file cannot be simply this

<name>Benni&Tanja</name>
You have to escape the '&' character or better put whole texts into CDATA, like this

<name><![CDATA[Benni&Tanja]]></name>
EDIT: just for your information. These three characters should never appear directly in plain text in xml '&', '<', '>' . Commonly wrote used '&', should be also written as '&amp;' , so you may replace them
Title: Re: Convert KML file from Maverick
Post by: afx on August 24, 2013, 16:18:06
Brilliant, so Maverick writes broken XML ;-(
I'll load it up in Oxygen, that should find those spots quickly.
But do i really have to use this CDATA thing?
Can't I just write &amp; ?

thx
afx
Title: Re: Convert KML file from Maverick
Post by: Menion on August 24, 2013, 16:20:46
yes you can. CDATA is useful for example if you want to put whole HTML page into some <desc>...</desc> tag. So you don't have to escape all characters, but just put whole page into this CDATA and .. done
Title: Re: Convert KML file from Maverick
Post by: afx on August 24, 2013, 16:29:42
Thanks,
it was only that one ampersand!

thx
afx
Title: Re: Convert KML file from Maverick
Post by: Menion on August 25, 2013, 17:21:07
perfect, glad to help ...