I want to read text from a file which looks like:
Look up for : Bergwald Elsa-Brändström-Str
http://www.overpass-api.de/
output:
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base="2015-07-08T07:36:02Z"/>
<node id="2505961536" lat="48.9722935" lon="8.4618593">
<tag k="bus" v="yes"/>
<tag k="highway" v="bus_stop"/>
<tag k="name" v="Elsa-Brändström-Straße"/>
<tag k="network" v="Karlsruher Verkehrsverbund (KVV)"/>
<tag k="operator" v="Verkehrsbetriebe Karlsruhe"/>
<tag k="public_transport" v="stop_position"/>
</node>
</osm>
Look up for : Bergwald Hooverstraße
http://www.overpass-api.de/
output:
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base="2015-07-08T07:36:02Z"/>
<node id="2505961539" lat="48.9741500" lon="8.4640651">
<tag k="bus" v="yes"/>
<tag k="highway" v="bus_stop"/>
<tag k="name" v="Hooverstraße"/>
<tag k="network" v="Karlsruher Verkehrsverbund (KVV)"/>
<tag k="operator" v="Verkehrsbetriebe Karlsruhe"/>
<tag k="public_transport" v="stop_position"/>
</node>
</osm>
At first I have to to extract the string which comes after Look up for :. Then I have to extract the part belonging to the first extracted string which starts at the tag osm version= and finish at the tag osm. I want to parse this part of with a xml parser.
I could not find any solution where I can match each extracted string values after Look up for : to its belonging output.
Does anyone have any ideas?
Best regards, Nazar