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

XML - Find Schema & Structure

HenpetsGordres1
8 - Asteroid

Hello,


If I have an XML file is there any way to output the structure and column names held within, but not the data. For example, in the following:

 

HenpetsGordres1_0-1584012130873.png

 

I would like my final output to appear as:

CATALOG.CD.TITLE
CATALOG.CD.ARTIST
CATALOG.CD.COUNTRY
CATALOG.CD.COMPANY
CATALOG.CD.PRICE
CATALOG.CD.YEAR

 

I have attached the sample XML File and also my attempt to date, although it may not be the best way to approach the issue.

 

Many thanks.

 

5 REPLIES 5
TomWelgemoed
12 - Quasar

Hi @HenpetsGordres1 ,

 

This was a nice challenge!

 

Think this does it. (see attached)

 

Regards,

Tom

 

XML.png

HenpetsGordres1
8 - Asteroid

Hi Tom,

 

Many thanks for your response, I'm receiving the following error when running the worflow:

 

HenpetsGordres1_0-1584103005486.png

 

Would you have any idea on how to fix?

 

Thanks!

TomWelgemoed
12 - Quasar

Hi @HenpetsGordres1 ,

 

That's strange, it works perfect when I import the file I uploaded.


Basically, just select whatever field is in the input - did you change the input perhaps? If so, you want to select the field (that should contain the whole XML as in my example)  and parse that. Please also note that I increased the field size (of the input) to 2500 - you need to adjust that to the size of your XML (amount of characters).

 

Simply ensure all your input settings mirror what I sent and then apply it to your new file. Then make sure you refer to the right field in the next step.

 

Thanks,

Tom

HenpetsGordres1
8 - Asteroid

Apologies, not sure how but I changed Input from CSV to XML. Brilliant solution, thanks very much!

TomWelgemoed
12 - Quasar

Welcome! Nice weekend.

Labels