I'm using pyKML to generate a KML file containing several gx:Tracks with several <when>
, <gx:coord>
, and <gx:angles>
tags. It seems that the schema wants these tags in order, meaning first all <when>
tags, then the <gx:coord>
tags, and so on.
For my file generation it is more convenient however to write the tags intermixed, meaning <when1><coord1><angles1><when2><coord2>...
inside the <gx:Track>
tag.
Is there some way to sort the tags again after adding using lxml/pyKML, or do I have to search for the last <when>
tag and insert the new tags manually at the correct positions?