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

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.

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.
Highlighted
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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog