Load Multiple XML files and store in QVDs

    Script to Load Multiple XML files and store in QVDs

     

    1.NoConcatenate for separate QVDs:

    // Root variable holds path with xml files

    Set Root="C:\Qlikview\XmlFiles";
    Set A = 0;
    Set vTableName ="XmlData";

    FOR each FILE in filelist (Root&'\*.xml')

    let A=$(A)+1;
    let vTableName = $(vTableName)+$(A);


    // create table(s) according to your xml structure.

    $(vTableName):
    NoConcatenate
    LOAD

    ID,
    Name,
    Date,
    FileName(FILE) as key

    FROM $(FILE)(XmlSimple, Table is [table]);

    STORE $(vTableName) INTO $(vTableName).QVD;

    NEXT FILE

     

    OR

     

    2.Concatenate for Consolidate QVD for all files.

    // Root variable holds path with xml files 

    Set Root="C:\Qlikview\XmlFiles";

    Set vTableName ="XmlData";

    FOR each FILE in filelist (Root&'\*.xml')

    let vTableName = $(vTableName);

     

    // create table(s) according to your xml structure.

    $(vTableName):
    Concatenate
    LOAD

    ID,
    Name,
    Date,
    FileName(FILE) as key

    FROM $(FILE)(XmlSimple, Table is [table]);

    NEXT FILE

    STORE $(vTableName) INTO $(vTableName).QVD;