<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [resolved] tExtractXMLField &amp;quot;the root element must be well-formed&amp;quot; in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractXMLField-quot-the-root-element-must-be-well/m-p/2206347#M6441</link>
    <description>Hi,&lt;BR /&gt;i have a simple XML-File, I read it with tFileInputXML, than one filed I want to extract with&amp;nbsp;tExtractXMLField. The from tFileInputXML mapped variable contains:&lt;BR /&gt;&lt;PRE&gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;01&amp;lt;/b221&amp;gt;&amp;lt;b233&amp;gt;VLB_ID_old&amp;lt;/b233&amp;gt;&amp;lt;b244&amp;gt;3726602&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;01&amp;lt;/b221&amp;gt;&amp;lt;b233&amp;gt;Publishers Order No&amp;lt;/b233&amp;gt;&amp;lt;b244&amp;gt;11199&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;02&amp;lt;/b221&amp;gt;&amp;lt;b244&amp;gt;3866324502&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;03&amp;lt;/b221&amp;gt;&amp;lt;b244&amp;gt;9783866324503&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;b221&amp;gt;15&amp;lt;/b221&amp;gt;&amp;lt;b244&amp;gt;9783866324503&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;in&amp;nbsp;tExtractXMLField the Loop Xpath Query is "productidentifier". In this step the error&amp;nbsp;&lt;BR /&gt;Error on line 2 of document &amp;nbsp;: The markup in the document following the root element must be well-formed. Nested exception: The markup in the document following the root element must be well-formed. - Line: 4&lt;BR /&gt;occured.&lt;BR /&gt;But the XML-Snippet is wellformed. I'm a little bit helpless.</description>
    <pubDate>Tue, 27 Sep 2016 09:57:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-27T09:57:25Z</dc:date>
    <item>
      <title>[resolved] tExtractXMLField "the root element must be well-formed"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractXMLField-quot-the-root-element-must-be-well/m-p/2206347#M6441</link>
      <description>Hi,&lt;BR /&gt;i have a simple XML-File, I read it with tFileInputXML, than one filed I want to extract with&amp;nbsp;tExtractXMLField. The from tFileInputXML mapped variable contains:&lt;BR /&gt;&lt;PRE&gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;01&amp;lt;/b221&amp;gt;&amp;lt;b233&amp;gt;VLB_ID_old&amp;lt;/b233&amp;gt;&amp;lt;b244&amp;gt;3726602&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;01&amp;lt;/b221&amp;gt;&amp;lt;b233&amp;gt;Publishers Order No&amp;lt;/b233&amp;gt;&amp;lt;b244&amp;gt;11199&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;02&amp;lt;/b221&amp;gt;&amp;lt;b244&amp;gt;3866324502&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b221&amp;gt;03&amp;lt;/b221&amp;gt;&amp;lt;b244&amp;gt;9783866324503&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;b221&amp;gt;15&amp;lt;/b221&amp;gt;&amp;lt;b244&amp;gt;9783866324503&amp;lt;/b244&amp;gt;&amp;lt;/productidentifier&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;in&amp;nbsp;tExtractXMLField the Loop Xpath Query is "productidentifier". In this step the error&amp;nbsp;&lt;BR /&gt;Error on line 2 of document &amp;nbsp;: The markup in the document following the root element must be well-formed. Nested exception: The markup in the document following the root element must be well-formed. - Line: 4&lt;BR /&gt;occured.&lt;BR /&gt;But the XML-Snippet is wellformed. I'm a little bit helpless.</description>
      <pubDate>Tue, 27 Sep 2016 09:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractXMLField-quot-the-root-element-must-be-well/m-p/2206347#M6441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-27T09:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractXMLField "the root element must be well-formed"</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractXMLField-quot-the-root-element-must-be-well/m-p/2206348#M6442</link>
      <description>The solution is:
&lt;BR /&gt;
&lt;PRE&gt;&amp;lt;productidentifier&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;b221&amp;gt;03&amp;lt;/b221&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;b244&amp;gt;9783866324503&amp;lt;/b244&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/productidentifier&amp;gt;&lt;/PRE&gt;
&lt;BR /&gt;is really " not wellformed". I put an map-Component between the steps, and add an&amp;nbsp;
&lt;BR /&gt;
&lt;PRE&gt;"&amp;lt;?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?&amp;gt;&amp;lt;message release=\"2.1\"&amp;gt;" + row2.gtin + "&amp;lt;/message&amp;gt;"&lt;/PRE&gt;
&lt;BR /&gt;so the xml-snippet now is well formed, and the xpath query will work.&amp;nbsp;
&lt;BR /&gt;Hope, this helps in other cases too.</description>
      <pubDate>Tue, 27 Sep 2016 14:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractXMLField-quot-the-root-element-must-be-well/m-p/2206348#M6442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-27T14:28:41Z</dc:date>
    </item>
  </channel>
</rss>

