I am parsing an kml file which contains data like that:
<when>2013-08-15T15:00:39.744-07:00</when>
<gx:coord>13.7457943 52.0683374 0</gx:coord>
<when>2013-08-15T15:01:39.868-07:00</when>
<gx:coord>15.7458125 52.063955 0</gx:coord>
actually I like to parse that in bash so that I get when
and gx:coord
in one loop:
I got this far:
cat test.kml | grep -e "gx:coord" | while read line
do
echo $line
done
Which gives me all coords, and on the same way I would get the whens, read in a array I might achieve what I want, but there must be a better way :) Thnx in advance.