Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a problem with reading XML-file. I have upgraded to qlikview server november 2017 sr1 and now have problems reading xml-files.
The xml-files worked in version 11. At the top of the xml-file there is a row starting with <!DOCTYPE. If i manually remove the line it works. The wizard shows the file and I can import / read the XML-file. But with this <!DOCTYPE it's not working.
I have tried to change to xmlsax instead. If I try on my local PC it works with xmlsax but not on the server. I have installed Microsoft msxml version 3 och version 6 on the server but with no luck.
Any suggestions how to solve this?
Best regards
Peter
Found this information Qlik Support
Description | |
In Qlik View and Qlik Sense it appears that you cannot load XML files with Document Type Definition (DTD) content by default To verify if your XML file contain DTD information, you can simply open it (or save it on your disk if it's from a URL) and check usually the line 2. You should see something looking like: <!DOCTYPE random PUBLIC "-//NLM//DTD random "https://xxx/yyyzzz/file.dtd"> | |
Cause | |
The purpose of a Document Type Definition (DTD) is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. This behavior is working as designed as by default we dont load xml files with a DTD because they can be used in denial of Service attacks. This security feature was not available in the previous version of QlikView for instance (11.20) | |
Resolution | |
If you want to load XML file with DTD content you will need to disable the setting ProhibitDTD.For Qlik Sense
You can then store the result in another XML file and load it normally in Qlik. The script would look like this (Note: For Qlik Sense you will need to use library instead of the path directly) Clean_XML: // Load content of the XML as Fixed Record file format and skip the first two lines LOAD [@1:n] FROM [Path_or_URL_to_the_XML] (fix, codepage is 1252, embedded labels, header is 2 lines); //Store the result in another XML STORE Clean_XML INTO "C:\temp\temp_xml.xml" (txt); DROP TABLE Clean_XML; // Start of [temp_xml.xml] LOAD statements Id: LOAD Field1, Field2 FROM | |
Disclaimer | |
Access to this article is provided to you as part of your subscription to Qlik Maintenance. This article is deemed to be “Documentation” under the terms of the license agreement applicable to your Qlik software. All rights reserved © QlikTech International AB. |
I think this will be helpful: Re: Valid XML no longer supported by Qlik!
- Marcus
Found this information Qlik Support
Description | |
In Qlik View and Qlik Sense it appears that you cannot load XML files with Document Type Definition (DTD) content by default To verify if your XML file contain DTD information, you can simply open it (or save it on your disk if it's from a URL) and check usually the line 2. You should see something looking like: <!DOCTYPE random PUBLIC "-//NLM//DTD random "https://xxx/yyyzzz/file.dtd"> | |
Cause | |
The purpose of a Document Type Definition (DTD) is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. This behavior is working as designed as by default we dont load xml files with a DTD because they can be used in denial of Service attacks. This security feature was not available in the previous version of QlikView for instance (11.20) | |
Resolution | |
If you want to load XML file with DTD content you will need to disable the setting ProhibitDTD.For Qlik Sense
You can then store the result in another XML file and load it normally in Qlik. The script would look like this (Note: For Qlik Sense you will need to use library instead of the path directly) Clean_XML: // Load content of the XML as Fixed Record file format and skip the first two lines LOAD [@1:n] FROM [Path_or_URL_to_the_XML] (fix, codepage is 1252, embedded labels, header is 2 lines); //Store the result in another XML STORE Clean_XML INTO "C:\temp\temp_xml.xml" (txt); DROP TABLE Clean_XML; // Start of [temp_xml.xml] LOAD statements Id: LOAD Field1, Field2 FROM | |
Disclaimer | |
Access to this article is provided to you as part of your subscription to Qlik Maintenance. This article is deemed to be “Documentation” under the terms of the license agreement applicable to your Qlik software. All rights reserved © QlikTech International AB. |