Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #195: XML Parsing

Highlighted
Alteryx Partner

I've never worked with XML before, so this was a neat exploration into the parse tool! 

 

Spoiler
JustinBabbittEAG_0-1578326569806.png
Highlighted
14 - Magnetar
14 - Magnetar

My solution!

 

Spoiler
Featuring my favorite tool, Make Columns - not once, but twice!! 🙂 There is almost certainly a more efficient way to parse this, but this is the logic my brain took, and since I got to use my favorite tool, I'm just going to go with it.

WeeklyChallenge195.JPG

Cheers!

NJ

Highlighted
8 - Asteroid
Spoiler
Laszlo_D_0-1578357852091.png

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@OllieClarke Haha. You know me too well Ollie. I was searching for your post thinking "...I bet he's used Regex". But well done.

 

My solution attached,

 

Spoiler
WorkflowWorkflowAnd Using CSS Selectors in BeautifulSoupAnd Using CSS Selectors in BeautifulSoup
Highlighted
Alteryx Partner

 

Solution attached.

 

Spoiler
bstroh_0-1578440227306.png
Highlighted
8 - Asteroid

Hi All,

 

My submission is below.

Spoiler
I parsed the XML using the child of entry and source separately and the joined them back together with a RecordID.
-I really enjoyed learning about XML and parsing, as I don't have much experience in the matter.
-Cheers!

Matt


Capture.PNG
Highlighted
7 - Meteor
Spoiler
cdavis19_0-1578652622712.png
Highlighted
6 - Meteoroid
Spoiler
ErikaLoz_0-1578665834837.png

I use VS Code to view XML text and expand/collapse nodes, which is really helpful to understand XML structure. 

Highlighted
5 - Atom
Spoiler
I actually work with XML files frequently so I figured this was a good choice as my first challenge. 
image.png
Highlighted
8 - Asteroid

I solved it, but I have to admit that some other solution are way more elegant 🙂

 

Spoiler
tonyadam_1-1578780827806.png