How to parse an XML format file and load data into a table
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Solved! Go to Solution.
- Labels:
- Custom Tools
- Developer
- Developer Tools
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That Worked Thanks Much
Ashwin
