tFileInputMSXML - Document

One Star

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.
Community Manager

Re: tFileInputMSXML - Document

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
----------------------------------------------------------
Talend | Data Agility for Modern Business