Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

issues Importing XML

How do I import all types of xml files. its obvious qlik doesn't import all xml files as I have been deadlocked with importing some xml files. Is there any standard in importing / reading xml files ?

15 Replies
marcus_sommer

Did you try it with the file-wizard? XML will be natively supported - if the wizard didn't recognize the file as xml or returned a message with anything like " * invalid * " it means that the file-structure doesn't fits to the Qlik rules of a valid XML (no DTP and a few more). In this case you could try to adjust (with various string-functions) the file before loading it as XML and loading it then with from_field: XML-string-parsing-in-QV-LOAD-script.

- Marcus

Anonymous
Not applicable
Author

Hallo @marcus_sommer,

I tried to load the xml data via the wizard but got the response "An error occurred : in valid parameters". I am new to qlik. the load editor script not intuitive for me to comprehend. Is there a script I can copy and paste ( or edit ) to handle this error?

I would love to load 7 xml files so I can create 7 tables to from it for my data model.

Went through the links but it wasn't comprehensive enough

marcus_sommer

There are multiple reasons possible. Unfortunately the search within the very new release of the qlik community doesn't work very well but by using google you will find various postings to this topic:

qlik+community%2C+xml%2C+%22An+error+occurred+%3A+invalid+parameters%22

- Marcus

timpoismans
Specialist
Specialist

Any chance you could possibly provide a sample xml? Would make it easier to help you find what's going wrong.

Anonymous
Not applicable
Author

@timpoismans

here is sample xml below.. I have 7 different xml files similar to this I want to import to qlik sense enterprise and create a data model out of it.

<?xml version="1.0"?>
<invoiceEvent>
  <bypassCount>0</bypassCount>
  <initialAmountInvoiced>158.75</initialAmountInvoiced>
  <invoiceDocumentCount>1</invoiceDocumentCount>
  <stepID></stepID>
  <invoiceBillingApp>abcd</invoiceBillingApp>
  <customerName>Godspower</customerName>
  <processID></processID>
  <invoiceBusinessUnit>xyx</invoiceBusinessUnit>
  <lineCharges>D56=125.0,D57=33.75</lineCharges>
  <targetFileURL>http://api.me.com</targetFileURL>
  <receiverID>KMCUUSOCTST</receiverID>
  <customerID>US J3655</customerID>
  <transactionNumber>500001</transactionNumber>
  <translationStatus>Successful</translationStatus>
  <customerReference>MSP067002,DZI180445,9406800654,1293569</customerReference>
  <bill>MSP067002</bill>
  <groupControlNumber>50</groupControlNumber>
  <origin>txx</origin>
  <senderID>071695233T</senderID>
  <countryCode>xc</countryCode>
  <ServiceCallURL>http://me.com</ServiceCallURL>
  <timeReceived>20181126 03:30</timeReceived>
<invoiceEvent>
 
 
 
 
timpoismans
Specialist
Specialist

Your invoiceEvent tag isn't closed.

last line should be </invoiceEvent> instead of <invoiceEvent>.

 

Should work fine then.

In case this is just part of a real data file, check the opening and closing tags. 

Trying to load the XML file in Excel might give you a better indication where the error is in your XML file.

Anonymous
Not applicable
Author

ok I just did and can't still import it. Cat Sad

timpoismans
Specialist
Specialist

Can you import the following:

<?xml version="1.0"?>
<invoiceEvent>
  <bypassCount>0</bypassCount>
  <initialAmountInvoiced>158.75</initialAmountInvoiced>
  <invoiceDocumentCount>1</invoiceDocumentCount>
  <stepID></stepID>
  <invoiceBillingApp>abcd</invoiceBillingApp>
  <customerName>Godspower</customerName>
  <processID></processID>
  <invoiceBusinessUnit>xyx</invoiceBusinessUnit>
  <lineCharges>D56=125.0,D57=33.75</lineCharges>
  <targetFileURL>http://api.me.com</targetFileURL>
  <receiverID>KMCUUSOCTST</receiverID>
  <customerID>US J3655</customerID>
  <transactionNumber>500001</transactionNumber>
  <translationStatus>Successful</translationStatus>
  <customerReference>MSP067002,DZI180445,9406800654,1293569</customerReference>
  <bill>MSP067002</bill>
  <groupControlNumber>50</groupControlNumber>
  <origin>txx</origin>
  <senderID>071695233T</senderID>
  <countryCode>xc</countryCode>
  <ServiceCallURL>http://me.com</ServiceCallURL>
  <timeReceived>20181126 03:30</timeReceived>
</invoiceEvent>
Anonymous
Not applicable
Author

unfortunately I cant