Hi All,
I need some help in extracting the xml file (mostly it is very huge file) with multiple child tags. I tried all options given in the https://help.alteryx.com/current/ReadingXML.htm, but unable to figure it out.
Input
<Employee>
<EmployerID>1234</EmployerID>
<FirstName>abcd</FirstName>
<MiddleName>xyz</MiddleName>
<LastName>MEZA</LastName>
<Suffix>MR</Suffix>
<Family>
<FamilyID>5678</FamilyID>
<FamilyFirstName>Maria</FamilyFirstName>
<FamilyMiddleName>xyz</FamilyMiddleName>
<FamilyLastName>Agnes</FamilyLastName>
<FamilySuffix>MR</FamilySuffix>
</Family>
</Employee>
<Employee>
<EmployerID>9234</EmployerID>
<FirstName>abcd</FirstName>
<MiddleName>xyz</MiddleName>
<LastName>MEZA</LastName>
<Suffix>MR</Suffix>
<Family>
<FamilyID>5978</FamilyID>
<FamilyFirstName>Maria</FamilyFirstName>
<FamilyMiddleName>xyz</FamilyMiddleName>
<FamilyLastName>Agnes</FamilyLastName>
<FamilySuffix>MR</FamilySuffix>
</Family>
</Employee>
Table
EmplyeeID | FirstName | MiddleName | LastName | Suffix | FamilyID | FamilyFirstName | FamilyMiddleName | FamilyLastName | FamilySuffix |
1234 | 5678 | ||||||||
9234 | 5978 |
Solved! Go to Solution.
Thanks @DavidP for the quick solution - Just want to check what configuration you used for the XML input file configuration
Use an Input Data tool with file type CSV and delimeter set as \0
The use autofield and then the parse XML macro
Hi @DavidP,
I tried and able to parse my data into it. But I need the output in table format, however, this doesn't meet that need and again in need to use those keys to spilit.
I have a data of 3 levels of Child tags, which I need to tag to the root, which is the employee.
Let me know if you have any other solution.
Thanks
Naga
It will be much easier to help if you can post some sample data.
Hi @Rehat
Attached is a packaged workflow that reads and flattens your xml file with the parse XML macro.
Let me know if this is what you're looking for.
If you're on an older version of Alteryx, you may get an error when double clicking the yxzp file. However, look in your downloads folder as it would have unzipped itself into a folder from where you should be able to run it.