Closed GoogleCodeExporter closed 9 years ago
libkml is actually functioning as intended in this case. libkml contains logic
to verify that a given element be in the same XmlFile (KmlFile) as its parent.
generally KmlFile is written to be quite strict in the handling of the dom
associated with the file. The matter boils down to this code:
http://code.google.com/p/libkml/source/browse/trunk/src/kml/base/xml_element.h#9
1
This is to prevent one element from winding up in two different KmlFiles.
One could argue for an enhancement to first import a given element into
the KmlFile and from there attach it to a parent within that file.
Your work is better handled at a pure dom level. Use kmldom::Parse() instead
of kmlengine::KmlFile(). Then both the parsed dom and any elements created
are both in the same file: the NULL file.
Original comment by kml.b...@gmail.com
on 20 May 2009 at 11:02
Original issue reported on code.google.com by
jiangx...@gmail.com
on 15 May 2009 at 4:02