<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
I want to extract <font face="Courier New, Courier, monospace">lat</font>,
<font face="Courier New, Courier, monospace">lon</font> and <font
face="Courier New, Courier, monospace"><rte>-name</font>
from gmx files. See the following reduced example:<br>
-----------------------------------------------------------------------------------------------------------------------------------------<br>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><gpx
xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.topografix.com/GPX/1/1">"http://www.topografix.com/GPX/1/1"</a> creator="MEDIA-TOURS"
version="1.1" xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.topografix.com/GPX/1/1http://www.topografix.com/GPX/1/1/gpx.xsd">"http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/1/1/gpx.xsd"</a>><br>
<!-- <br>
line of comments<br>
...<br>
line of comments<br>
--><br>
<rte><br>
<name>route_1</name><br>
<rtept lat="52.00424932154729" lon="8.875365257263184"><br>
<name>1 Start</name><br>
</rtept><br>
<rtept lat="52.00319255643224" lon="8.878369331359863"><br>
<name>11 station</name><br>
</rtept><br>
<rtept lat="52.00271700399025" lon="8.879871368408203"><br>
<name>111 destination.</name><br>
</rtept><br>
</rte><br>
</gpx><br>
------------------------------------------------------------------------------------------------------------------------------------<br>
<font face="Courier New, Courier, monospace">lat </font><font
face="Courier New, Courier, monospace">and </font><font
face="Courier New, Courier, monospace">lon</font> should be
collected as numerical colum vectors, <font face="Courier New,
Courier, monospace">name </font>as a colum of strings. <br>
<br>
Which commands would you recommend? Is reading by <font
face="Helvetica, Arial, sans-serif">mgetl</font> and retrieving by
<font face="Helvetica, Arial, sans-serif">regexp</font>
recommendable?<br>
<br>
The regex expression itself is no problem, e.g.
(?<=(<name>))(\w|\d|\n|[().,\-:;@#$%^&*\[\]"'+–/\/®°°!?{}|`~]|
)+?(?=(</name>))<font face="Courier New, Courier, monospace"><br>
<br>
<font face="Times New Roman, Times, serif">I'm not asking for an
executable function, just a smart choice of commands.</font> <br>
<br>
Kind regards, Jens<br>
</font>
</body>
</html>