Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parsing XML Field

dawid_nawrot
9 - Comet

Just wondering if it's possible - I have a CSV file with two columns, one is XML the other date. How can I parse the first column as XML? I tried XML Parse but that requires XML file to be connected if I'm not mistaken however I only have XMLs as a field which comes out as V_WString.

 

If it can't be done, do you think it would be good to add XML as an option of TYPE in SELECT tool?

6 REPLIES 6
KaneG
Alteryx Alumni (Retired)

Hi David,

 

You can bring the csv file into Alteryx as a CSV file and then connect the XML Parse tool. Just tell the tool which field is XML. It doesn't matter what type the column is as you're telling the tool that it's actually XML. 

 

Kane

s_pichaipillai
12 - Quasar

I think the default size would be 254 if we use CSV / EXcel 

what if we have the XML string more than the size of 254

so we need to convert to flat file then add the size there

 CSV_xmlParsing.PNG

take a look at the sample i attached here. hope this will give a direction

Ned
Alteryx Alumni (Retired)

Don't convert to a flat file.  Under the options for CSV there is a field size that defaults to 254.  You can make it as big as you want.

s_pichaipillai
12 - Quasar

Excellent Ned

I missed it.. thanks!!!

 

dawid

PFA simple demo as per Ned comment

NeilR
Alteryx Alumni (Retired)

@dawid_nawrot the XML Parse tool's icon that @KaneG mentions matches your avatar!

dawid_nawrot
9 - Comet

ahhh those little things we sometimes omit.. Thank you  that was the problem

 

Cheers everybody!

Labels