php simpleXML :parsing an osm-file and storing the output to mysql
I am new to PHP's SimpleXML.
The original version of this question was derived from here: OSM Data parsing to get the nodes with child I am thankful that hakre offered a great example in the comments that makes a overwhelming starting point for my project. Below I have added my own answer to the question, how to refine the code to ad more tags. I want to filter the data to get the nodes with special category. Here is sample of the OSM data I want to get the whole schools within an area. The first script runs well - but now I want to refine the search and add more tags. I want to store all into MySQL. So we need to make some XML parsing with PHP: The following is a little OSM Overpass API example with PHP SimpleXM PHP Code:
how to get more out of it.. at least the adress and the website where to add those tags in the request`? in this line: PHP Code:
|
Quote:
http://www.linuxquestions.org/questi...db-4175506044/ ...where you say you wanted to store XML data from OSM into a MySQL database. Which is also the same thread where you said: Quote:
http://www.linuxquestions.org/questi...5D-4175507384/ ...but again didn't follow up with anything there, either. If you're never going to follow up, post answers to questions, or try what's suggested, why bother posting??? AGAIN, we are always happy to HELP someone, but YOU HAVE TO SHOW EFFORT OF YOUR OWN...yes, I'm sure you'll again say "Wow, great advice, I'll be sure to do it!"...as you have numerous times in the past. Again, since you've done "lots of work with PHP", did you read the PHP SimpleXML manual???? Look at the examples? Just based on the examples in the manual, anyone with any PHP experience should easily be able to modify what's going on: http://us2.php.net/manual/en/simplex...ples-basic.php http://us2.php.net/manual/en/simplex...ples-basic.php You would very obviously look at the entire record of what's being returned from that query, and add the new field in. |
All times are GMT -5. The time now is 10:21 PM. |