kml parsing functions and tests