Skip to content

Instantly share code, notes, and snippets.

@tdsmith
Created January 2, 2011 21:15
Show Gist options
  • Save tdsmith/762821 to your computer and use it in GitHub Desktop.
Save tdsmith/762821 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
from BeautifulSoup import BeautifulStoneSoup
f = open('VCH Restaurant Data.kml', 'r')
buf = f.read()
f.close()
soup = BeautifulStoneSoup(buf)
for placemark in soup.findAll('placemark'):
guid = placemark.find('data', {'name': 'Restaurant GUID'}).value.text
coordinates = placemark.coordinates.text
print '%s\t%s' % (guid, coordinates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment