Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to load an xml file into qlikview, this it self doesnt form a problem. But some key field have multiple attributes with the same field name.
XML example:
<artikel id="MSN-1362211">
<afbeeldingen><afbeelding hash="ad4f280203ea8339ee5a4762ee047149"><![CDATA[https://***/images/Naaldvilt matten set.jpg]]></afbeelding>
<afbeelding hash="093b525f8b1df17cc2843fdb8405cf1f"><![CDATA[https://***/images/MSN-1362211.jpg]></afbeelding>
</afbeeldingen>
</artikel>
Result now:
id | afbeelding |
MSN-1362211 | https://***/images/Naaldvilt matten set.jpg |
MSN-1362211 | https://***/images/MSN-1362211.jpg |
What i would like:
id | Afbeelding1 | Afbeelding2 |
MSN-1362211 | https://***/images/Naaldvilt matten set.jpg | https://***/images/MSN-1362211.jpg |
Can anyone help please?
Perhaps this?
XMLData:
LOAD id,
RowNo() as Status,
afbeelding
FROM
[https://community.qlik.com/t5/New-to-QlikView/XML-Load-same-attributes/m-p/1654918#M384350]
(html, utf8, embedded labels, table is @1);
FinalTable:
LOAD Distinct id
Resident XMLData;
FOR i = 1 to FieldValueCount('Status')
LET vField = FieldValue('Status', $(i));
Left Join (FinalTable)
LOAD id,
afbeelding as [afbeelding $(vField)]
Resident XMLData
Where Status = $(vField);
NEXT i;
DROP Table XMLData;
Did Anil's suggestion work to solve your use case? If so, do not forget to return to your post and use the Accept as Solution button on his post to give him credit for the assistance as well as let other Community Members know this worked. The only other solution would be to update the xml schema I believe, as that should be from where we are pulling things...
Regards,
Brett
It's definitly an option, it works but takes a lot of time when you have 35.000 rows.
But the best option so far! Thx