how can i get plain xml to a mysql-db-formate?

well i do some requests:

i am doing like so: i send a request to the API-Server - over http as a respond i get the following result - in XML

example: the following link gives back all the Nodes of the Type amenity=restaurant in XML-Format.Note: the bounding box (bbox) limits the area:[amenity=restaurant][bbox=9.4908142,48.7810801,9.5660019,48.8387351][amenity=restaurant][bbox=9.4908142,48.7810801,9.5660019,48.8387351]

note - i do it with wget since the XAPI-service is down for maintenance

see here the results:_

<?xml version='1.0' standalone='no'?>
<osm version='0.6' generator='xapi: OSM Extended API 2.0' xmlns:xapi='' xapi:uri='/api/0.6/node[amenity=restaurant|fast_food|pub|cafe][bbox=9.4908142,48.7810801,9.5660019,48.8387351]' xapi:planetDate='20100824' xapi:copyright='2010 OpenStreetMap contributors' xapi:license='Creative commons CC-BY-SA 2.0' xapi:bugs='For assistance or to report bugs contact' xapi:instance='zappyOsm'>
<node id='721241970' lat='48.830856' lon='9.5116892' user='mabe75' timestamp='2010-05-04T19:01:28Z' uid='260302' version='1' changeset='4607010'>
<tag k='amenity' v='restaurant'/>
<tag k='name' v='Lamm'/>
<node id='392682646' lat='48.8315734' lon='9.5468864' user='MattGPS' timestamp='2010-05-11T19:00:20Z' uid='12973' version='3' changeset='4671372'>
<tag k='amenity' v='restaurant'/>
<tag k='name' v='Gasthaus an der Wieslauf'/>
<node id='319597380' lat='48.8277913' lon='9.5477029' timestamp='2008-12-17T21:13:15Z' version='1' changeset='444629'>
<tag k='amenity' v='restaurant'/>
<tag k='name' v='Gasthaus zur Linde'/>

well this example works pretty well - if i do it with wget.

question: how can i get plain xml to a mysql-db-formate?

any idea and pointer towards a way to go will be greatly appreciated

asked 18 Apr '12, 07:35

tagtheworld's gravatar image

accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 18 Apr '12, 07:35

question was seen: 1,999 times

last updated: 18 Apr '12, 07:35

powered by OSQA