samcragg / sharpkml

SharpKML is an implementation of the Open Geospatial Consortium (OGC) KML 2.2 standard developed in C#, able to read/write both KML files and KMZ files.
MIT License
158 stars 51 forks source link

kml format is not supported #27

Closed antonad closed 4 years ago

antonad commented 4 years ago

Hello. I have tried to use SharpKml for parsing this file. There are 2 problems while parsing:

  1. import fails until I have removed kml tag and replaced Document with Document xmlns="http://www.opengis.net/kml/2.2"

  2. because of tabs in text file styles was parsed with bugs, for example color = ddff0000 was parsed as 0000000d

Geofences.zip

Can you comment first problem? Can without xmlns be used? Can be used?

Can you remove /tabs, blanks before parsing colors and similar fields?

Thanks.

samcragg commented 4 years ago

For the first problem you can use the Parser directly to ignore namespaces, see legacy files for an example.

For the second problem, I've just publised an updated package (v 5.1.1) that will now ignore the whitespace, sorry about that.

Thanks for opening the issue; if there are any other errors then please feel free to open a new one 🙂

antonad commented 4 years ago

Thank you very much. Working great.