Javier C Javier C -3 years ago 167
C# Question

Read a kml file on c# project to give back the information

I'm trying to read a KML file in a C #. I need to read this information to get the information and treat it. Is there a library to read a KML giving back the information in a data structure? If not, how do you read a KML file? Is it like reading a XML file?

Answer Source

I've found the solution. The problem was the new xsd file have multiple namespace, so to convert to classes using XSD.exe I needed two more files: atom-author-link.xsd and xal.xsd

After that I've used XSD.exe with this command line: xsd.exe /c ogckml22.xsd atom-author-link.xsd xal.xsd

Finally, I had classes from xsd file.

Additional information:

I've just found this library (http://sharpkml.codeplex.com/) to read/write kml 2.2 files. It's an update of libkml

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download