msmitherdc / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

Namespace is not output #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Kml element and invoke SerializePretty() on it

What is the expected output? What do you see instead?

You should see:

<kml xmlns="http://www.opengis.net/kml/2.2">

You actually get:

<kml>

The enum specifies the namespace in the constructor, it just never gets
used for some reason. Obviously, this is a minor issue, and can be solved
but adding your own Attributes set, but it seems odd not to use the xmlns
member already present to generate a useful namespace.

Original issue reported on code.google.com by ajpatter...@gmail.com on 8 Jul 2009 at 5:46

GoogleCodeExporter commented 9 years ago
The kmldom parse/serialize don't do namespaces.
Use kmlengine::KmlFile::SerializeToString()

Original comment by kml.b...@gmail.com on 8 Jul 2009 at 11:16

GoogleCodeExporter commented 9 years ago
I'm coding in Python and was wondering if you had some example code to output 
the kml 
tag with the appropriate namespaces? Or just in general, it would be really 
helpful if 
you could post some code on how to use the Attributes set.

Thank you so much!

Original comment by cedricsam on 18 Aug 2009 at 6:44

GoogleCodeExporter commented 9 years ago
Use kmlengine.KmlFile as in this unit test:

http://code.google.com/p/libkml/source/browse/trunk/src/swig/kmlengine_test.py#2
26

Original comment by kml.b...@gmail.com on 22 Aug 2009 at 12:58