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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputMSXML - Document

Hi,
i try to parse a xml file using the tFileInputMSXML Component.
XML Layout (Sample)
<?xml version="1.0" encoding="UTF-8"?>
<employee id="1">
<epno type="1">1</epno>
...
<years>
<year id="2011" update="2011-07-01">
<assessment by="1">10</assessment>
...
<title xml:lang="en">ABC</title>
<title xml:lang="fr">ABC</title>
</year>
</years>
</employee>

I set the Root XPath Query to "/ employee".
In the Subshema (Causing the prob. ) the XPath Query is "/years/year".
And in the Shema for years i have the assessment field and a column named XML_Doc of the type "Document".
Without the XML_Doc Column everything works as expected.
I want to populate the XML_Doc Column with the xml data from the year so that i can use the tExtractXMLField Component to read the titles as well as the year - so i set the XPath Query to "." to save the whole object - but as soon as i add the column i get the following error.
Error on line 1 of document  : Content is not allowed in prolog. Nested exception content is not allowed in prolog.

- TOS 5.1.1.r118616
Thank you in advance.
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi
You aren't able to extract a document from a XML file with tFileInputMSXML, you should use tFileInputXML instead of tFileInputMSXML and check the 'Get Nodes' box of the column.
Best regards
Shong