Four Stars

The markup in the document following the root element must be well-formed

I am using Talend 3.2.2 on windows 7.

I am facing an issue while reading from an XML file. The ETL application complains that the xml is not well formed.
Following is a sample xml file
<customer id="1">
<customername>Griffith Paving and Sealcoatin</customername>
<customeradresses>
<customeraddress>talend apres 91</customeraddress>
<customeraddress>511 Maple Ave. Apt. 1B</customeraddress>
<customeraddress>1799 Rosemary Way</customeraddress>
<customeraddress>1859 Green Bay Rd.1</customeraddress>
</customeradresses>
<labelstate>Connecticut</labelstate>
<regtime>03-11-2006</regtime>
<fresh>67852.0</fresh>
<frozen>61521.4852</frozen>
</customer>

Now in my Talend ETL, as soon as the tFileInputMSXML component finds the end tag /Customer, the whole XML structure is getting repeated leading to an error. For ex:

<customer id="1">
<customername>Griffith Paving and Sealcoatin</customername>
<customeradresses>
<customeraddress>talend apres 91</customeraddress>
<customeraddress>511 Maple Ave. Apt. 1B</customeraddress>
<customeraddress>1799 Rosemary Way</customeraddress>
<customeraddress>1859 Green Bay Rd.1</customeraddress>
</customeradresses>
<labelstate>Connecticut</labelstate>
<regtime>03-11-2006</regtime>
<fresh>67852.0</fresh>
<frozen>61521.4852</frozen>
</customer> <customer id="1">
<customername>Griffith Paving and Sealcoatin</customername>
<customeradresses>
<customeraddress>talend apres 91</customeraddress>
<customeraddress>511 Maple Ave. Apt. 1B</customeraddress>
<customeraddress>1799 Rosemary Way</customeraddress>
<customeraddress>1859 Green Bay Rd.1</customeraddress>
</customeradresses>
<labelstate>Connecticut</labelstate>
<regtime>03-11-2006</regtime>
<fresh>67852.0</fresh>
<frozen>61521.4852</frozen>
</customer>

 

We are using basic settings of the tFileInputMSXML component. No loop limit is specified. The issue happens only for some xml files and it is totally random.

Any ideas as to what could be going wrong?

Thanks in advance.

3 REPLIES
Moderator

Re: The markup in the document following the root element must be well-formed

Hi,

 Talend 3.2.2 is a very old version. Could you please try to use talend V 6.4 to see if this issue repro?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: The markup in the document following the root element must be well-formed

Thanks for your prompt reply.

I tried it on talend v6.4 but the issue still exists. Any ideas please?

 

Regards

 

Moderator

Re: The markup in the document following the root element must be well-formed

Hello,

So far, talend studio needs XML document to be both well-formed (satisfying XML syntax rules) and valid (conforming to a specified DTD).

Is your XML file well-formed?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.