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

XML Parsing return only one record instead whole.

rohit782192
11 - Bolide

Hello,

I have one Sample XML as below.

 

<Record>

<Name>George Washington</Name>

<Party>No party</Party>

<From>1789-04-30</From>

<To>1797-03-04</To>

</Record>

<Record>

<Name>John Adams</Name>

<Party>Federalist</Party>

<From>1797-03-04</From>

<To>1801-03-04</To>

</Record>

 

When we Parse through input tool only one record is returned instead of two record.

 

Can anyone suggest what is wrong.

 

Attached the workflow and xml for reference.

 

 

 

 

4 REPLIES 4
vizAlter
12 - Quasar

@rohit782192 —You are showing two independent rows (branches) instead of capturing them into one parent (root), hence it was creating issue at line#8 for assuming that Extra content at the end of the document.

 

You may take help from any online xml editor (example: https://xmlgrid.net/) to see what is wrong in your file.

 

Hope the attached solution would be helpful.

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<items>
	<Record>
		<Name>George Washington</Name>
		<Party>No party</Party>
		<From>1789-04-30</From>
		<To>1797-03-04</To>
	</Record>
	<Record>
		<Name>John Adams</Name>
		<Party>Federalist</Party>
		<From>1797-03-04</From>
		<To>1801-03-04</To>
	</Record>
</items>

 

 

 

If this post assists in resolving the question, please mark it "Like", or "Solved" if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

rohit782192
11 - Bolide

Thanks. It work for me.

2704ARR
6 - Meteoroid

Hi I am unable to download this due to restrictions, is it possible to show a snippet of what the workflow looks like please?

vizAlter
12 - Quasar

Hi @2704ARR — I have just checked and am able to download the attached ".yxzp" file. It contains the prepared workflow along with the file for input sample).

 

And, looks like this:

vizAlter_0-1616011093944.png

 

If you have similar kind of issue then please follow the link mention in this post.

 

If this is helpful, please mark it solved.

Labels