Locus Map - forum

Support => Troubles & Questions => Topic started by: ysop on June 20, 2011, 22:08:03

Title: problem when importing POI from kml
Post by: ysop on June 20, 2011, 22:08:03
I want to import POIs of campsites. The kml file is provided by
//http://www.bordatlas.de/
Locus is reporting a problem and is not importing the POI. The reason is the element "description". I have attached a part of the file. I hope you can solve the problem so that I can use locus and the POIs in my vacation.
Thank you very much for the great app!
Title: Re: problem when importing POI from kml
Post by: Menion on June 21, 2011, 07:56:30
Hi Ysop,
  on first quick look ... this file is not VALID kml file. It contain HTML data in description tag but this is not allowed in XML file. All these texts have to be in CDATA attribute so it have to look like this

<description>
<![CDATA[
Stellplatz aus dem <a href="http://www.bordatlas.de/">BORDATLAS</a> von Reisemobil International
<p>W&#246;rnitz</p>
<p><a href="http://www.reisemobil-international.de/bordatlas2/stellplatz2.html?id=1874">BORDATLAS 2011 Seite 594</a></p>
]]>
</description>

then it will be valid kml file and there shouldn't be any problem with import. Also if you want to use some special characters in name tag, I suggest also place it into CDATA to prevent some problems
Title: Re: problem when importing POI from kml
Post by: ysop on June 21, 2011, 22:43:53
Hi Menion,

thank you for the fast response. I have uploaded the file to //http://www.xmlvalidation.com and no error was reported. Also Google Earth is accepting the file. But nevertheless I will write a progrom to delete the element because the information is not necessary.
Title: Re: problem when importing POI from kml
Post by: berkley on June 22, 2011, 13:43:41
Why don't you just simply import the kml into google mymaps, open your google mymaps in locus, long click on your desired map and finally click "import" to Locus...?

Just as an option ;)
Title: Re: problem when importing POI from kml
Post by: Menion on June 22, 2011, 13:50:02
also solution :)

anyway little bit out of topic ... is directly included XHTML(HTML) code in XML tag really valid?? How can I then parse it in application? Really weird ...