Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to convert complex XML data to tabular format

I have this XML file which I extracted from my cmc server.  I am showing you the sample xml file how it looks like.

I want to transform my xml into something like this.

NAMEIDCUIDPARENTIDUSERGROUPS
John23sdfsdfsd211
emily342asfvsed21101
emily342asfvsed21432
emily342asfvsed21334
Oliver47233sdfsdfssdfs211
Oliver47233sdfsdfssdfs21243

The XML seems more complicated and is becoming difficult for me to extract the data into tabular format. I was able to join name,id,cuid, parentid as they were only single values. But since for each user, there are many usergroups, it becomes difficult as QlikView creates many keys which seems unnecessary.

For name,id,cuid,parentid I used this -

LOAD RowNo() as link, attr%Table as ID

FROM [Sourcepath] (XmlSimple, Table is [feed/entry/content/attrs/attr])

Where name = 'ID';


Left Join  Load RowNo() as link, attr%Table as CUID

FROM [Sourcepath] (XmlSimple, Table is [feed/entry/content/attrs/attr])

where name = 'CUID';



Left Join LOAD RowNo() as link, attr%Table as NAME

FROM [Sourcepathl] (XmlSimple, Table is [feed/entry/content/attrs/attr])

Where name = 'NAME';


Left Join LOAD RowNo() as link, attr%Table as PARENTID

FROM [Sourcepath] (XmlSimple, Table is [feed/entry/content/attrs/attr])

Where name = 'PARENTID';


Could anyone help in formatting the usergroups.



Thank you - vaibhav borkar

0 Replies