I have some XML, pasted below and also attached.
<suite> <testcase id="001" kind="bvt"> <inputs> <arg1>4</arg1> <arg2>7</arg2> </inputs> <expected>11.00</expected> </testcase> <testcase id="002" kind="drt"> <inputs> <arg1>9</arg1> <arg2>6</arg2> </inputs> <expected>15.00</expected> </testcase> </suite>
I'd like Alteryx to ingest this as:
id kind arg1 arg2 expected
1 bvt 4 7 11
2 drt 9 6 15
I have a solution attached and pictured below:
That subsequent step would need to be repeated, I think, if the XML nesting was deeper.
Is there a solution that will work no matter how deep the nesting?
Solved! Go to Solution.
load your file as a csv and choose \0 as the delimiter then connect the output to the parse XML macro.
Thank you, DavidP. Let me load it up and check it out.
Hello DavidP, I'm getting an error:
You Shouldn't edit the macro file.
The Input data tool in the workflow calling the parse xml macro should be set as csv with \0 delimiter and uncheck first row contains headers
Ok, I'm new enough that I don't know how to use a macro yet.
I will report back in a few days after I figure out how to do so.
Just extract and run the workflow I attached to my last post
Thanks @DavidP - I also grabbed the data and the macro and it doesn't seem to return the results @JasonFriedman is looking for.
Curious if you tested the macro against the xml file (so it would be just my user error stopping me from getting the results)?