Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Parse XML question

DSnyder1
5 - Atom

Hi, I'm trying to parse XML that I'm getting as a response to an API call. The structure of the XML is the following for each row of data:

 

 

<Results>
	<Properties>
		<Property>
			<Name>First_Name</Name>
			<Value>Phil</Value>
		</Property>
		<Property>
			<Name>Date_of_Application</Name>
			<Value>01/01/2000</Value>
		</Property>
	</Properties>
</Results>
<Results>
	<Properties>
		<Property>
			<Name>First_Name</Name>
			<Value>Joe</Value>
		</Property>
		<Property>
			<Name>Date_of_Application</Name>
			<Value>01/01/2000</Value>
		</Property>
	</Properties>
</Results>

 

 

Using the XML parse tool with the following settings ... 

 

Capture.PNG

 

I'm getting back data that in this format ... 

 

NameValue
First_NamePhil
Date_Of_Application01/01/2000
First_NameJoe
Date_Of_Application 01/01/2000

 

However what I'm after is data in this format ...  

 

First_NameDate_Of_Application
Phil01/01/2000
Joe01/01/2000

 

I've tried stringing together multiple parse XML tools with just about every combination of Child name/values but I'm not able to figure it out. Any suggestions? 

3 REPLIES 3
T_Willins
14 - Magnetar
14 - Magnetar

Hi @DSnyder1,

 

Sometimes it is difficult to get the XML to parse exactly as you want it.  Utilizing other Alteryx tools as below will give you the result you are looking for.

 

Cleanse XML parse.png

 

fmvizcaino
17 - Castor
17 - Castor

Hi @DSnyder1 ,

 

Would you be able to share a small sample of you file in xml format?

Then I can check it out and try to solve it 🙂

 

Best,

Fernando Vizcaino

DSnyder1
5 - Atom

Thanks @T_Willins, this worked perfectly. 

Labels