[Qgis-user] KML CDATA to attributes

Jorge Tornero - Listas jtorlistas at gmail.com
Tue Apr 8 23:35:08 PDT 2014


Good morning everybody,

I'm importing KML files with points which contains valuable information 
within ![[CDATA] fields. Is there any simple way to parse/extract 
information from CDATA to attributes when importing the KML into QGIS?

For instance, each of the points inside the KML is:

<Placemark>
             <description><![CDATA[<b>Date: </b>6/4/2014   21:36:57<br 
/><b>Latitude </b>N36º31'56"<br /><b>Longitude </b>W6º16'55"<br 
/><b>Speed: </b>0 Knots<br /><b>Bearing: </b>270.2º<br />]]></description>
             <styleUrl>#iconStyle0</styleUrl>
             <Point>
<coordinates>-6.28206,36.53234</coordinates>
             </Point>
         </Placemark>

And what would be desirable is to get a vector layer with the attributes:

Date
Latitude
Longitude
Speed
Bearing

I guess it is pretty difficult to do, mostly because CDATA can carry 
anything inside, but maybe someone of you has faced this before.

All the best

Jorge Tornero



More information about the Qgis-user mailing list