Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Two identically formatted XML files from the same source (Data Input)

billbradstreet
6 - Meteoroid

I created a workflow off of a specific XML file from my Garmin watch data, which worked as expected. That was two days ago. I downloaded more GPS tracks from the same website, which produced what looks like identically formatted GPX (XML) files.

 

After downloading the files, I renamed the extensions to XML to use the data input tool. Again, this worked fine the other day when working off of the first GPS track. All other GPS tracks I've downloaded (28 of them) aren't working.

 

I've attached two of the GPS track files and the yxmd.

 

Please be kind as I really am an Alteryx Infant. What am I doing wrong?!

 

I just finished the set of designer courses and plan on taking the certification exam. But before I attempt it, I wanted to do some real-world workflows. My goal is to find the max sustained speed for each GPS track and plot where they fall on a map. Then I can do some modeling to see whether there is a more likely spot on the lake where I go the fastest (broken down by heading).

8 REPLIES 8
terry10
11 - Bolide

I think your problem may be that the schemas for these two xml files is not quite the same for the 'ele' field.

 

Futura_117_1.xml:   the ele V_String size is 29

20200513 S-Pace 7.3 11.09 miles.xml   the ele V_String size is 21

billbradstreet
6 - Meteoroid

In order to get the string size for elevation, that implies you were able to read the 20200513 XML file? (This is what I haven't been able to do without a lot of hoops to jump through.)

 

Why would the string size matter? I'm having difficulty getting the XML to parse in the same manner.

terry10
11 - Bolide

@billbradstreet 

 

I had no trouble opening the files directly. No hoops!

I have attached a yxzp for you to try.

 

capture1.PNGcapture2.PNG

billbradstreet
6 - Meteoroid

This keeps getting stranger as it goes. I downloaded the three files that I had uploaded and was able to replicate your (correct) results.

 

If I open one of the files that never made the round trip through the Internet, I still have the issue. 

 

 

image (3).png

 

Hmm.

danilang
19 - Altair
19 - Altair

Hi @billbradstreet 

 

Can you attach the 20191201 S-Pace...xml.  that you show in the last screen shot.  Maybe that one does have a different format

 

Dan

billbradstreet
6 - Meteoroid

I do appreciate your willingness to look at this with me. I'm being more thorough/complete with my upload this time. I'm uploading ALL the XML files. 🙂

 

I'm confused why one parses to exactly the spot I want (trkpt) and the rest do not. I notice that some of the XML files contain a <description> field, but others do not, so this doesn't seem like a likely reason for the failure of all but one XML parse.

 

I have attached a workflow that has all the files in question. One container contains all that "failed" and another container contains the one "success."

 

I zipped up all the XML files together.

 

Thank you!

danilang
19 - Altair
19 - Altair

Hi  @billbradstreet 

 

The successful file(20200513 S-Pace 7.3 11.09 miles.xml) has a completely different format from the others

 

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="Garmin Connect" version="1.1"
  xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/11.xsd"
  xmlns:ns3="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
  xmlns="http://www.topografix.com/GPX/1/1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
  <metadata>
    <link href="connect.garmin.com">
      <text>Garmin Connect</text>
    </link>
    <time>2020-05-13T16:46:04.000Z</time>
  </metadata>
  <trk>
    <name>Winter Haven Windsurfing</name>
    <type>wind_kite_surfing</type>
    <trkseg>
      <trkpt lat="28.03208048455417156219482421875" lon="-81.74758709035813808441162109375">
        <ele>144.399993896484375</ele>
        <time>2020-05-13T16:46:04.000Z</time>
        <extensions>
          <ns3:TrackPointExtension>
            <ns3:atemp>30.0</ns3:atemp>
            <ns3:hr>114</ns3:hr>
          </ns3:TrackPointExtension>
        </extensions>
      </trkpt>
      <trkpt lat="28.032080568373203277587890625" lon="-81.74759178422391414642333984375">
        <ele>139.1999969482421875</ele>
        <time>2020-05-13T16:46:09.000Z</time>
        <extensions>
          <ns3:TrackPointExtension>
            <ns3:atemp>30.0</ns3:atemp>
            <ns3:hr>112</ns3:hr>
          </ns3:TrackPointExtension>
        </extensions>
      </trkpt>

 

The other ones all have this format

<?xml version="1.0" encoding="UTF-8"?>
<kml
  xsi:schemaLocation="http://earth.google.com/kml/2.1 http://earth.google.com/kml2.1.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://earth.google.com/kml/2.1">
  <Folder>
    <name>Winter Haven Windsurfing</name>
    <Placemark>
      <name>Track</name>
      <Style>
        <LineStyle>
          <color>FF0000FF</color>
          <width>3.0</width>
        </LineStyle>
      </Style>
      <LineString>
        <extrude>false</extrude>
        <tessellate>true</tessellate>
        <altitudeMode>clampToGround</altitudeMode>
        <coordinates>-81.74774877727032,28.032101187855005 -81.74770519137383,28.031894909217954 -81.74739623442292,28.031440945342183 -81.74697898328304,28.030400415882468 -

The successful one has a trk element that includes a series of trkpt elements.  trkpt what Alteryx auto detects as the repeated element.  The other ones have Folder elements that contain Placemark elements.  Folder is what Alteryx autodetects for these.   Any idea why these have different formats? 

 

To get the equivalent information out of the Folder ones, you need a series of XML Parse tools to extract all the elements you need and followed by a Text to Columns to parse the coordinates element

 

Dan  

billbradstreet
6 - Meteoroid

Now I feel silly. Thanks for catching my mistake for me. 😕

 

I downloaded all the GPS tracks so many times in so many different formats. I imagine I retained the wrong ones. I'll try again!

Labels