community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #37: Parsing a Raw XML File

Alteryx Partner

My solution

 

Spoiler
challenge_37_RODO_Solution.png
Alteryx Partner

Don't really understand why I could not see the shipping data (even when I copied the input into Excel).  But when run through Text to Columns, it is there.  Even so, I was able to get pretty good solution

 

Spoiler
Process:
- Data cleanup to get rid of a couple of unneeded fields
- Add Record IDs for later cross-tab
- First Text to Columns: Split to Rows on "<" - this provides what will become the Field Name (but currently includes the Values as well - separated by ">")
- Second Text to Columns: Split to Columns on ">" - this splits the field name from the values
- Formula adds "Bill to" or "Ship to" to the values field (enabling a cross-tab to be employed to split these values)
- Data Cleansing - to get rid of whitespace that was messing up the filter
- Filter to remove records where values are empty
- Two Crosstabs - on Record ID, and other common data, columns are headers, values are values (the two columns derived above)
  -- First one takes the first value - Billing info
  -- Second one takes the last value - Shipping info
- Join on Record ID
- Select to get rid of un-needed fields, rename, and re-order (I know, I could have used embedded select in the Join, but I am working on limited screen real estate and found this simpler)
- Formula to create Null for phone and email are same for Billing and Shipping (although it seems to be based on just the phone)

MySolution.PNG

 

Bolide

Reposting to add attachment.  NOTE:  This was completed prior to changes noted in thread start.

 

Spoiler
Workflow 37.GIF

 

Asteroid

Unfamiliar with XML so this took a good bit longer than I wanted, but learned some new stuff

Spoiler
challenge_37_solution_justindavis.PNG
Asteroid
 
Alteryx Partner

Previously missing the file.

Asteroid

Even though I've done work projects for XML using Alteryx before, I always have some difficulty sorting out structure in my head. This solution is cleaned up LOTS from my original. 

Spoiler
Spoiler
ZHSOL.png

I liked this one

Spoiler
Screenshot_2019-11-10 19.55.38_M6ZmEt.png

 

Asteroid