<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello Samuel,<br>
    <br>
    I tried the script <br>
    <pre style="font-style: normal; font-size: 13px;"><font face="Helvetica, Arial, sans-serif"><big><big>doc=xmlRead("G:/Daten/Navigation/gpxArchiv/testfile.gpx")
recent = <span style="text-decoration: underline;">getPreferencesValue</span>("/gpx/rte/body/rtept", ["lat","lon"],doc)<span style="font-style: italic;"></span>
xmlDelete(doc)</big></big></font></pre>
    The file is as below. <br>
    <br>
    The result is:<br>
     doc  = <br>
    XML Document<br>
    url: <a class="moz-txt-link-freetext" href="file:///G:/Daten/Navigation/gpxArchiv/testfile.gpx">file:///G:/Daten/Navigation/gpxArchiv/testfile.gpx</a><br>
    root: XML Element<br>
     !--error 10000 <br>
    getPreferencesValue: Invalid XPath request.<br>
    at line      39 of function getPreferencesValue called by :  <br>
    recent = getPreferencesValue("/gpx/rte/rtept", ["lat","lon"],doc)<br>
    at line      55 of exec file called by :    <br>
    exec('G:\Daten\Navigation\eTrex10_GPX_Generator.sce', -1)<br>
    <br>
    What am I doing wrong here?<br>
    Regards, Jens<br>
-----------------------------------------------------------------------------<br>
     <br>
    <div class="moz-cite-prefix">Am 22.05.2017 01:31, schrieb Jens Simon
      Strom:<br>
    </div>
    <blockquote cite="mid:5922236B.2060601@hslmg.de" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Great, I will try this soon.<br>
      Regards, Jens<br>
--------------------------------------------------------------------------<br>
      <br>
      <div class="moz-cite-prefix">Am 22.05.2017 01:14, schrieb Samuel
        Gougeon:<br>
      </div>
      <blockquote
        cite="mid:f4c32091-a21f-4dd8-4f74-528e585f31fe@free.fr"
        type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Hello,<br>
          <br>
          Le 22/05/2017 à 00:32, Jens Simon Strom a écrit :<br>
        </div>
        <blockquote cite="mid:59221585.7000204@hslmg.de" type="cite">
          <meta http-equiv="content-type" content="text/html;
            charset=ISO-8859-1">
          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 moz-do-not-send="true"
            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
            moz-do-not-send="true" class="moz-txt-link-rfc2396E"
            href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
          xsi:schemaLocation=<a moz-do-not-send="true"
            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>
        </blockquote>
        <br>
        xmlXPath() is made for parsing xml documents and extracting
        selected informations.<br>
        getPreferencesValue() may also help. It is based on xmlXPath()<br>
        <br>
        HTH<br>
        Samuel<br>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>