Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have a KML file which has attribute data(Inside the tag with about 12 data points). This file was generated on ArcGIS. I'm trying to write a PHP script to parse this KML file and insert the datapoints within the ExtendedData tag into a db. How do i do this?

share|improve this question
up vote 2 down vote accepted

This is a high-level answer as you've not given any specifics.

Reading KML is basically the same as XML (KML being a subset thereof).

Some possible resources:

Then you just take the variable that you've read your data to and output it to the database.

share|improve this answer
Hey! That worked. Thank you! Sorry about not being specific, but then my question was very basic to start with. Anyways, Cheers! I used simplexml_load_file to load the file, the functions after that were pretty easy. Thank you once again. – KaushikTD Apr 27 '12 at 22:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.