[Scilab-users] Extracting numerical an text data from gmx files

Jens Simon Strom j.s.strom at hslmg.de
Mon May 22 01:31:55 CEST 2017


Great, I will try this soon.
Regards, Jens
--------------------------------------------------------------------------

Am 22.05.2017 01:14, schrieb Samuel Gougeon:
> Hello,
>
> Le 22/05/2017 à 00:32, Jens Simon Strom a écrit :
>> Hi,
>> I want to extract lat, lon and <rte>-name from gmx files. See the 
>> following reduced example:
>> -----------------------------------------------------------------------------------------------------------------------------------------
>> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><gpx 
>> xmlns="http://www.topografix.com/GPX/1/1" creator="MEDIA-TOURS" 
>> version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>> xsi:schemaLocation="http://www.topografix.com/GPX/1/1 
>> http://www.topografix.com/GPX/1/1/gpx.xsd">
>> <!--
>> line of comments
>> ...
>> line of comments
>>  -->
>> <rte>
>> <name>route_1</name>
>> <rtept lat="52.00424932154729" lon="8.875365257263184">
>> <name>1 Start</name>
>> </rtept>
>> <rtept lat="52.00319255643224" lon="8.878369331359863">
>> <name>11 station</name>
>> </rtept>
>> <rtept lat="52.00271700399025" lon="8.879871368408203">
>> <name>111 destination.</name>
>> </rtept>
>> </rte>
>> </gpx>
>> ------------------------------------------------------------------------------------------------------------------------------------
>> lat and lon  should be collected as numerical colum vectors, name as 
>> a colum of strings.
>>
>> Which commands would you recommend? Is reading by mgetl and 
>> retrieving by regexp recommendable?
>
> xmlXPath() is made for parsing xml documents and extracting selected 
> informations.
> getPreferencesValue() may also help. It is based on xmlXPath()
>
> HTH
> Samuel
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170522/ad51cbd8/attachment.htm>


More information about the users mailing list