Showing posts with label KML. Show all posts
Showing posts with label KML. Show all posts

Monday, July 07, 2008

Auto-Generate KML C# Classes

Using the xsd.exe tool (in a default installation, you can find it here: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin), you can auto-generate KML C# classes. Make sure you have ogckm122.xsd (here), atom-author-link.xsd (here), and xAL.xsd (here) in the directory where you are executing the xsd command.

>xsd /c ogckml22.xsd atom -author-link.xsd xAL.xsd

This will generate a C# file called ogckml22_atom-author-link_xAL.cs.

Thanks to these two blog posts for the help: xsd command and multiple xsd files and Error generating classes for schema 'MySchema.xsd'.