This project has moved and is read-only. For the latest updates, please go here.

Custom output namespace

Jan 16, 2013 at 3:53 PM

I'm attempting to convert kml files output by Bing to the format expected by Android's emulator debug monitor.  You'd think a tool built by Google would work with the files this library creates as it so nicely implements Google's standard, but....

The emulator expects this namespace: <kml xmlns="">

Is there anyway to configure the creation of the new KmlFile to use this namespace instead of the provided namespace?


Jan 16, 2013 at 6:59 PM

Unfortunately there isn't a built in way to change the namespace, however, you can serialize the elements yourself and perhaps do a string replace? To serialize the root Kml element you can use the SharpKml.Base.Serializer class

If you need to deserialize Kml that has a different namespace then you can use the SharpKml.Base.Parser class, as shown in the Legacy Files page.

Hope it helps,