Alteryx Designer Desktop Discussions

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

Parse XML Government XML File

akanaka
5 - Atom

Hello everyone!

 

I'm trying to parse an XML file created by CMS. 

https://www.federalregister.gov/documents/full_text/xml/2020/05/01/2020-05050.xml

 

Ideally, I'd like to create one column with headers (indicated by the 'HD' Tag) and another columns with the details (usually indicated by the 'P' tag).

I'm very new to XML, and am having trouble parsing this. When I try to take the HD fields, the information under the 'P' tags do not populate, even when using the XML Parse tool. I believe it's because the 'P' sections are not child values under 'HD' tags, however, I am unsure if there's a way to get around this. 

 

I'd appreciate any suggestions you have! Thanks!

4 REPLIES 4
morr-co
10 - Fireball

Hi @akanaka - attached is an attempt at this. I found it more useful to first split the XML to rows, then use the XML parse tool. I wasn't sure what your desired output was so the summarization could obviously be changed.

Harbinger
9 - Comet

This should get you what you need! 

akanaka
5 - Atom

Thanks so much @morr-co, this is amazing!

 

Making some slight changes based on this but this seems to be what I'm looking for. Really appreciate it!

akanaka
5 - Atom

@Harbinger, thanks so much for your help as well!

 

I might be running your flow incorrectly - when I put a "Browse" on your last "Union" button, I'm only getting a few rows of data from the very top of the document. This is super useful though! Thanks!

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels