Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

XML Load Question: repeating nodes

Hi all,

Any thoughts on how to load an XML file of the structure:

<?xml version='1.0' encoding='utf-8'?>

<table title='Project Entities'>

  <columns>

         <column name='_humanised_name' title='Name' description='The name of the entity' width=''/>

         <column name='ENTITY_ID' title='Ref' description='Internal entity reference' width=''/>

  </columns>

  <rows>

       <row>

            <cell value='Customers'/>

            <cell value='1'/>

       </row>

       <row>

            <cell value='Orders'/>

            <cell value='2'/>

       </row>

  </rows>

</table>

So that the table is represented in Qlikview as:

Entity, ID

Customers,1

Orders,2

When using the generated XmlSimple statement, synthetic keys and an incorrect data model are generated.

Thoughts!?

Many thanks,

Dan

3 Replies
MarcoWedel

H,

one possible solution might be:

QlikCommunity_Thread_137372_Pic1.JPG.jpg

tabEntity:

Generic

LOAD Ceil(RecNo()/2) as RowNo,

     Pick(Mod(RecNo()-1,2)+1,'Entity','ID'),

     value

FROM [QlikCommunity_Thread_137372.xml] (XmlSimple, Table is [table/rows/row/cell]);

hope this helps

regards

Marco

Not applicable
Author

Thank you!!!

MarcoWedel

You're welcome.

Please mark this thread answered if there are no further questions.

Thanks

Regards

Marco