<?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 Re: XML API to CSV - Content is not allowed in prolog. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320095#M90267</link>
    <description>&lt;P&gt;Thanks again Shong. Proposed solution worked. Originaly i got working with just placing&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"&lt;A href="https://tatts.com/pagedata/racing/&amp;quot;+TalendDate.getDate(&amp;quot;yyyy/M/d&amp;quot;)+&amp;quot;/NRFields.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/"+TalendDate.getDate("yyyy/M/d")+"/NRFields.xml&lt;/A&gt;"&lt;/P&gt; 
&lt;P&gt;in the URL but it would only get one date.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;i will start another post with a different heading as i am now trying to get the URL to change based of a dynamic list which comes from another HTTP XML request.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thanks again, much appreciated.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;kind regards&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;David&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2017 01:39:41 GMT</pubDate>
    <dc:creator>DavidETL</dc:creator>
    <dc:date>2017-07-15T01:39:41Z</dc:date>
    <item>
      <title>XML API to CSV - Content is not allowed in prolog.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320091#M90263</link>
      <description>&lt;P&gt;Hello&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I need some community support with using the tRest----&amp;gt;xmlfield----&amp;gt;FileoutDelimited.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;&amp;nbsp;I am trying to extract information from&amp;nbsp;&lt;A href="https://tatts.com/pagedata/racing/2017/7/7/RaceDay.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/2017/7/7/RaceDay.xml&lt;/A&gt; &amp;nbsp; (this is a free public API)&lt;/LI&gt; 
 &lt;LI&gt;I have configured the flow as best i believe accurate based on the research on these forums.&lt;/LI&gt; 
 &lt;LI&gt;When i first select the URL in the tRest it only ever shows me Body or ERROR_CODE. I suspect this was normal so i then used tExtractXMLField to extract the data from the body&lt;/LI&gt; 
 &lt;LI&gt;In the tExtractXML field if i click sync Columns it only syncs the two BODY and ERROR_CODE. So instead of this i clicked on "EDIT SCHEMA" and created the columns i wanted so it would appear in the Mapping&lt;/LI&gt; 
 &lt;LI&gt;I then set the loop Xpath query to&amp;nbsp;"/RaceDay/RaceDay" as i only wanted to test if i could get the very first level.&lt;/LI&gt; 
 &lt;LI&gt;I then mapped each column to the exact path.&lt;/LI&gt; 
 &lt;LI&gt;When i run the job it i get the error "Error on line 1 of document &amp;nbsp;: Content is not allowed in prolog. Nested exception: Content is not allowed in prolog." in the CSV file it creates the heading for each column but no data.&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;Any help on this would be much appreciated. Screens are below.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Flow.JPG" style="width: 571px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvOy.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132771i3DBBBDA7C2027A8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvOy.jpg" alt="0683p000009LvOy.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="tRest.JPG" style="width: 931px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvP8.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137598i1F455E259B9423A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvP8.jpg" alt="0683p000009LvP8.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="xmlfield.JPG" style="width: 851px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lv5U.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137055i91324BA91D234FDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lv5U.jpg" alt="0683p000009Lv5U.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.JPG" style="width: 679px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvPD.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132335i58C01E02D85C9C04/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvPD.jpg" alt="0683p000009LvPD.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320091#M90263</guid>
      <dc:creator>DavidETL</dc:creator>
      <dc:date>2024-11-16T09:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: XML API to CSV - Content is not allowed in prolog.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320092#M90264</link>
      <description>&lt;P&gt;Hello &lt;BR /&gt;I got the same error with tExtractXMLFields, however, it works if I write the response to a file with tHttpRequest and then use a tFileInputXML to read the file. see&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LvP9.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128309i67344C1D17A2FED9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LvP9.png" alt="0683p000009LvP9.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Luln.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152891i79AA599B3E600916/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Luln.png" alt="0683p000009Luln.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 04:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320092#M90264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-10T04:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: XML API to CSV - Content is not allowed in prolog.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320093#M90265</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;that worked well thank you very much. Im not explorer how to create a variable and rotate through the date in the URL. For example if i set the job to run through every date from today + 3 days from now. do you have any advice on where to start with this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;kind regards&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 13:03:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320093#M90265</guid>
      <dc:creator>DavidETL</dc:creator>
      <dc:date>2017-07-14T13:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: XML API to CSV - Content is not allowed in prolog.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320094#M90266</link>
      <description>&lt;P&gt;Hello &lt;BR /&gt;If i understand your request well, you want to loop a date range and call the API for each date. To achieve it, you need to use a tLoop to do a loop for the API calling, eg:&lt;BR /&gt;tLoop--iterate--tJava--oncomponentok--tHttpRequest--oncomponentok--other components. &lt;BR /&gt;on tLoop, check 'For' loop type, set From as 0, To as 3, and Step as 1.&lt;BR /&gt;on tJava, build a dynamic URL for used on tHttpRequest:&lt;BR /&gt;&lt;BR /&gt;int i=((Integer)globalMap.get("tLoop_1_CURRENT_VALUE"));&lt;BR /&gt;java.util.Date currentDate=TalendDate.getCurrentDate();&lt;BR /&gt;String stringDate=(TalendDate.formatDate("yyyy/MM/dd",TalendDate.addDate(currentDate, i, "dd"))).replaceAll("/0","/");&lt;BR /&gt;&lt;BR /&gt;//System.out.println(stringDate);&lt;BR /&gt;context.URL="&lt;A href="https://tatts.com/pagedata/racing/&amp;quot;+context.URL+&amp;quot;/RaceDay.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/"+stringDate+"/RaceDay.xml&lt;/A&gt;"; &lt;BR /&gt;&lt;BR /&gt;on tHttpRequest, set the URL with context variable context.URL&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shong&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 14:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320094#M90266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-14T14:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: XML API to CSV - Content is not allowed in prolog.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320095#M90267</link>
      <description>&lt;P&gt;Thanks again Shong. Proposed solution worked. Originaly i got working with just placing&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"&lt;A href="https://tatts.com/pagedata/racing/&amp;quot;+TalendDate.getDate(&amp;quot;yyyy/M/d&amp;quot;)+&amp;quot;/NRFields.xml" target="_blank" rel="nofollow noopener noreferrer"&gt;https://tatts.com/pagedata/racing/"+TalendDate.getDate("yyyy/M/d")+"/NRFields.xml&lt;/A&gt;"&lt;/P&gt; 
&lt;P&gt;in the URL but it would only get one date.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;i will start another post with a different heading as i am now trying to get the URL to change based of a dynamic list which comes from another HTTP XML request.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thanks again, much appreciated.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;kind regards&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;David&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 01:39:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-API-to-CSV-Content-is-not-allowed-in-prolog/m-p/2320095#M90267</guid>
      <dc:creator>DavidETL</dc:creator>
      <dc:date>2017-07-15T01:39:41Z</dc:date>
    </item>
  </channel>
</rss>

