Commit 6c45b50a authored by heltonbiker's avatar heltonbiker

Added UsageExamples.py with one example.

parent 48b5f766
#!/usr/bin/env python
# coding: utf-8
from fastkml.kml import *
def printChildFeatures(element):
level = 0
for feature in element.features():
try:
print " " * level, feature.name
printChildFeatures(feature)
level += 1
except:
pass
if __name__ == '__main__':
fname = "KML_Samples.kml"
k = KML()
with open(fname) as kmlFile:
k.from_string(kmlFile.read())
printChildFeatures(k)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment