LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read XML file (extn is .gpx) created by Garmin GPS

Solved!
Go to solution

I need to read an XML file with extension .gpx created by Garmin GPS. Typically, the .gpx files we work with are 20K-30K rows. My present workaround is to open the .gpx file in Excel and save it as .csv, which I then read using LabVIEW. However, we'd like to take Excel out of the workflow and directly read the .gpx file in LabVIEW.

 

The attached .zip contains the original .gpx file created by the GPS and the .xlsx file created by open-save in Excel 2007.

 

I use LabVIEW 8.5.1 on Vista 64-bit.

 

Thanks!

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 11
(12,570 Views)

** Update **

 

I was able to read the .gpx file using EasyXML tool from JKI, http://jki.net/easyxml. See attached.

However, what I get is a single block of text which looks similar to reading the .gpx in Notepad. What I want to achieve is a column format exactly as shown in the .xlsx file I attached in the original post.

 

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 2 of 11
(12,554 Views)
Solution
Accepted by topic author Gurdas

Hi,

If this file has this format always you dont need to use an xml parser to extract the information. The function ScanFromString can do that. See the code that I developed

0 Kudos
Message 3 of 11
(12,546 Views)

Bruno, could you please reattach the VI as LV 8.5? I am unable to open your VI.

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 4 of 11
(12,539 Views)

Hi Gurdas,

you should connect a well formed cluster as data type to get the data in different arrays.

 

See this link for more information.

 

Mike

 

0 Kudos
Message 5 of 11
(12,514 Views)

Hi,

 

The code converted to 8.5.

0 Kudos