Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

XML parse - comment or processing instruction expected at Line

AshM
Alteryx
Alteryx

Hello,

 

I am creating a workflow with the input tool and connecting to an xml file.  I receive this error.
Error: Input Data (1): comment or processing instruction expected at Line:10 and Column:1

Looking at line 10 of the xml file, I see the body tag but not sure why it's failing on that line.  Also attaching the file.

 

I am looking to analyze and extract inside both the header and body tags.

 

Grateful for any advice.

xml.PNG

2 REPLIES 2
Felipe_Ribeir0
16 - Nebula

Hi @AshM 

 

There is something strange with the structure of this XML. Even if you try to open it with the browser (with notepad ++ too), you get the bellow error message (same that you get with Alteryx):

 

Felipe_Ribeir0_0-1667471364035.png

Doing some research, i found that a common XML file must have just 1 root element: Multiple xml elements in the same xml file - Stack Overflow

If you look at your file, you have 2 root elements (Header - row 2 and Body - row 10, exactly the row that shows the error)

 

Felipe_Ribeir0_2-1667471756483.png

 

Knowing that, i separated the file into 2 different XML's (one for the header and one for the body) and parsed it, it worked. Please take a look at the attached workflow.

 

Felipe_Ribeir0_3-1667471836763.png

 

AshM
Alteryx
Alteryx

@Felipe_Ribeir0 

 

A great big thanks for assisting here and I see in the input tool where I had bought this in as .xml in your worflow you have imported as .csv.   This gives me something to work on and some understanding as to whats going on with the file...  Again, big thank you.

 

Ash

Labels