Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
karandama2006
Creator
Creator

Parsing XML , where attribute values are columns

I'm trying to parse below xml to a row , the only problem is all values mentioned in Attribute are actually column names.

 

We can see , "C" is a name of column and its value is "value1" and "value2"

 

I want the values as below

 

ItemIDcLoginTimestamp
 value111/19/2019 8:01
 value111/19/2019 8:30

 

Can this be achieved without using Pivot ??

 

<Users>
<Items>
<UserProperty>
<Attribute>ItemID</Attribute>
<Value/>
</UserProperty>
<UserProperty>
<Attribute>c</Attribute>
<Value>value1</Value>
</UserProperty>
<UserProperty>
<Attribute>LoginTimestamp</Attribute>
<Value>11/19/2019 8:01:59 AM</Value>
</UserProperty>
</Items>

<Items>
<UserProperty>
<Attribute>ItemID</Attribute>
<Value/>
</UserProperty>
<UserProperty>
<Attribute>c</Attribute>
<Value>value2</Value>
</UserProperty>
<Attribute>LoginTimestamp</Attribute>
<Value>11/19/2019 8:30:12 AM</Value>
</UserProperty>

</Users>
Labels (3)
1 Solution

Accepted Solutions
karandama2006
Creator
Creator
Author

We used Quotes "" , while Pivoting the content , to avoid issue with delimiters

View solution in original post

2 Replies
karandama2006
Creator
Creator
Author

Problem with tPivotToColumnsDelimitedis with the delimitter , because the XML data has  , | ; and other commonly used delimitter

karandama2006
Creator
Creator
Author

We used Quotes "" , while Pivoting the content , to avoid issue with delimiters