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

How to parse an XML format file and load data into a table

Ashwin1
7 - Meteor

HI All,

I have an xml in this format.. How do i parse it in Alteryx and load the data into a table? When i read this in alteryx all the values are under one column with number of rows.  Any tips will be helpful.

 

 

<?xml version="1.0" encoding="UTF-8" ?>
<response xmlns="xxxxxxxx" src="app.id=xxxxx">
<fn name="xxxxxxx" rc="OK">
<map>
<map name="Test1">
<map name="xxx">
<val name="A"><![xxxxxxxxxxxxxxx></val>
<val name="B"><!xxxxxxxxxxxxxxxxxxxxxx</val>
<val name="C">xxxxxxxxxxx</val>
<val name="D"><xxxxxxxxxxxxxxx?</val>
<val name="E">xxxxxxxxxxx</val>
<val name="F">xxxxxxxxxxxxxxx</val>
</map>
</map>
<map name="Test2">
<map name="xxx">
<val name="A"><xxxxxxxxxxxxxxxxxx></val>
<val name="B">xxxxxxxxxxxxx</val>
<val name="C">xxxxxxxx</val>
<val name="E">xxxxxxxxxxxx</val>
<val name="F">xxxxxxxxxx</val>
</map>
</map>
<map name="Test3">
<map name="xxx">
<val name="A"><xxxxxxxxxxxxxxxx></val>
<val name="B">xxxxxxxxxxxx</val>
<val name="C">xxxxxxxxxx</val>
<val name="D">xxxxxxxxx</val>
</map>
</map>
</map>
</fn>
</response>

 

Thanks 

Ashwin

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @Ashwin1 ,

 

Would you be able to share your xml file instead of copying?

 

Best,

Fernando Vizcaino

Ashwin1
7 - Meteor

Thanks for getting back @fmvizcaino 

All I am looking to do is 

<val name="A"><xxxxxxxxxxxxxx]></val>

from the lines which has val 

For eg 

'A' should be the column header and 'xxx' should be the value. 

'B' should be the column header and 'xxx' should be the value. 

Find Attached

 

fmvizcaino
17 - Castor
17 - Castor

Hi @Ashwin1 ,

 

I needed to adjust your xml file, there was some '<', '>' in the values that was giving a xml error.

 

Attached is an example that does the job!

Let me know if that works for you.

Best,

Fernando Vizcaino

Ashwin1
7 - Meteor

That Worked Thanks Much 

Ashwin

Labels