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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
senpradip007
Specialist III
Specialist III

Re:Loading data from xml file.

Hi all,

I'm new in qlikview. I want to load data from xml file but could not get the desired result.

The following codes are xml code:

<ENVELOPE>

      <VOUCHER>

            <COMPANY>Company Name ABC</COMPANY>

            <BRANCH>Branch BCA</BRANCH>

            <DATE>1-1-2012</DATE>

            <TYPE>BCA LEDG</TYPE>

            <LINE_NO>1</LINE_NO>

            <CODE>GH2020</CODE>

            <LEDGER>XYZ AGENCY</LEDGER>

            <AMOUNT>10</AMOUNT>

            <NARRATION />

      </VOUCHER>

</ENVELOPE>

When I load the data from xml I get 8 tables named Company, Branch, Date, Type, Line_No, Code, Ledger, Amount.

But my desired result is to get Company, Branch, Date, Type, Line_No, Code, Ledger, Amount as the attribute.

Can anyone help me to get rid of this problem?

Thanx in advanced.

Pradip

Labels (1)
4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Pradip

This code generated by the XML wizard

VOUCHER:

LOAD COMPANY,

    BRANCH,

    DATE,

    TYPE,

    LINE_NO,

    CODE,

    LEDGER,

    AMOUNT

FROM (XmlSimple, Table is [ENVELOPE/VOUCHER]);

// End of [Test.xml] LOAD statements

produces one table, with the data in fields.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
senpradip007
Specialist III
Specialist III
Author

Hi Jonathan,

Thanx for the suggestion.

Say these fields contain 2 values and TYPE field contains one NULL data. Then final table should contain 2 rows of data.

Now the problem is qlikview load 1 row, it eleminates Null data of TYPE field.

Can you give more suggestion.

Regaeds

Pradip

jonathandienst
Partner - Champion III
Partner - Champion III

Pradip

I suggest that you post a sample of the XML file that demonstrates that behaviour, which does not seem like normal QV behaviour. If I can replicate your problem, then we can look for a solution.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
senpradip007
Specialist III
Specialist III
Author

Hi Janathan

I'av posted the sample xml file. It contains 2 rows of data. When I load it data of 1st row is loaded but 2nd row is not loaded. Please help me to get rid of this problem.

Regards

Pradip