Create KML files from a C# application using serialization

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi everybody,
Im working on an C# application that generates GoogleMaps files (*.kml) from a database.
I tried to create an object that can be serializable myself but it is too complexe.
I discovered the utility xsd.exe that can generate class from a XSD schema.
I downloaded the two XSD files available at this address : http://schemas.opengis.net/kml/2.2.0/ (I get this address from a KML file) and I tried the following command line (H:DevMaps is my working directory) :xsd h:DevMapsogckml22.xsd /classesI have the following error message :

Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.
Schema validation warning: The http://www.w3.org/2005/Atom:author element is n
ot declared. Line 311, position 12.
Schema validation warning: The http://www.w3.org/2005/Atom:link element is not
declared. Line 312, position 12.
Schema validation warning: The urn:oasis:names:tc:ciq:xsdschema:xAL:2.0:Address
Details element is not declared. Line 314, position 12.

Warning: Schema could not be validated. Class generation may fail or may produce
incorrect results.

Error: Error generating classes for schema h:DevMapsogckml22.
- The element http://www.w3.org/2005/Atom:author is missing.

If you would like more help, please type "xsd /?".Could you help me to generate my class to create KML files from a C# application using serialization ?

I would like not to use an external API.
Thanks in advance for you help.

View the full article
 
Back
Top