Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

XML Parsing Help !

JDong
8 - Asteroid

Hi All,

 

I am using an XML input and trying to extrac the child values. Please refer to the screenshot below :

 

 

Gallop_0-1576835679494.png

 

I am getting the desired parsed output but for one column called label.

 

This is the xml structure for this field

 

Gallop_2-1576835813541.png

 

Below is the output

 

Gallop_3-1576835922716.png

 

I suspect it maybe due to there being 2 tags and the input tool not recognizing the same.

 

Will be great if anyone has faced this issue previously and guide.

 

Thanks in advance.

17 REPLIES 17
KostjaPwC
6 - Meteoroid

Hello, 

Probably a stupid question, but you did you parse on the Label_OuterXML field? Because looks like previously you had the right format data there.

 

All the best,

Konstantin 

JDong
8 - Asteroid

Gallop_0-1576840723088.png

 

Gallop_1-1576840797249.png

 

Gallop_2-1576840848827.png

KostjaPwC
6 - Meteoroid

You have to enable option 8 in the import "Return outer XML" and then in parse change radio button to auto detect child and parse on field outer xml.

VianneyM
Alteryx
Alteryx

hi @JDong ,

 

Follow the first flow of your workflow 

On the input data tool activate option 8 : Return Outer XML

 

VianneyM_0-1576843111505.png

 

This will generate that in the output you get a column called Label_OuterXML

 

VianneyM_1-1576843166527.png

 

Now within the same flow use the XML parse tool and configure it like this

 

VianneyM_2-1576843356591.png

 

Let me know if you have questions

Best,
Vianney
JDong
8 - Asteroid

Tried the same settings but  I see this to be the output

 

Gallop_0-1576846371305.png

 

Other columns needed in the data set are fine. Please let me know in case of any questions

 

<TEST>
<i>10</i>
<Con>Sample1</Con>
<ID ColumnIndex="10">Category</ID>
<Label>
<Label Language="Spanish">Apple</Label>
<Label Language="English">Orange</Label>
</Label>
<Typ>Li</Typ>
<Tbl>Main</Tbl>
<Col>dependent</Col>
<SearchCol>no</SearchCol>
<ParentElementID>dxc</ParentElementID>
<ReferenceTable>ref</ReferenceTable>
<Ref>no</Ref>
<ReadOnly>false</ReadOnly>
<Required>false</Required>
<SingleSelectSearch>false</SingleSelectSearch>
<DisplayStyle>default</DisplayStyle>
<SectionRow>5</SectionRow>
<SectionColumn>5</SectionColumn>
<WidthUnits>2</WidthUnits>
<HeightUnits>1</HeightUnits>
</TEST>
<TEST>
<idx>11</idx>
<Con>Sample</Con>
<ID ColumnIndex="11">id</ID>
<Label>
<Label Language="Spanish">abc</Label>
<Label Language="English">abcd</Label>
</Label>
<Typ>Li</Typ>
<Tbl>main</Tbl>
<Col>dependent</Col>
<SearchCol>no</SearchCol>
<ParentElementID>dxc</ParentElementID>
<ReferenceTable>ref1</ReferenceTable>
<Ref>no</Ref>
<ReadOnly>false</ReadOnly>
<Required>false</Required>
<SingleSelectSearch>false</SingleSelectSearch>
<DisplayStyle>default</DisplayStyle>
<SectionRow>6</SectionRow>
<SectionColumn>1</SectionColumn>
<WidthUnits>2</WidthUnits>
<HeightUnits>1</HeightUnits>
</TEST>

benakesh
12 - Quasar

Hi @JDong ,

I am reading this as  text file with no delimiter  \0  and  using xml parsing tool.

benakesh_0-1576849754411.png

 

Inactive User
Not applicable

Can anything be done with existing Excel ? I get file regularly as excel

 

Thanks

VianneyM
Alteryx
Alteryx

Hi @JDong,

 

Please find attached a workflow that shows you the configuration that you can follow to be able to read the Label 

 

VianneyM_0-1577096437990.png

 

configuration input tool:

VianneyM_1-1577096592022.png

 

Configuration Parse tool:

 

VianneyM_2-1577096745469.png

 

 

Let me know if you have any questions

 

Best,

Vianney

 

Best,
Vianney
Labels