<?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>article REST connector does not recognize XML format in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/REST-connector-does-not-recognize-XML-format/ta-p/1717826</link>
    <description>&lt;P&gt;When loading XML response from an API source with Qlik REST connector, Qlik Sense fails to recognize the XML response and shows error &lt;I&gt;"Cannot parse data in the selected response type. Check the "Response type" parameter value. XML was not found"&lt;/I&gt;. The file works fine when loaded directly, the issue only happens when loading it via the REST connector.&lt;BR /&gt;The XML response is very simple with only one element, for example the following:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;lt;count&amp;gt;123456&amp;lt;/count&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="https://qlik--c.um1.content.force.com/servlet/servlet.FileDownload?file=0153z0000019Fvs" border="0" alt="Cannot parse data in the selected response type. Check the " /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4 class="qlik-migrated-tkb-headings"&gt;Cause:&lt;/H4&gt;
&lt;P&gt;REST connector is unable to&amp;nbsp;parse the&amp;nbsp;response because it does not contain any element (only a single value) under root&amp;nbsp;(&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;lt;count&amp;gt;&lt;/SPAN&gt;). Qlik REST connector takes the root element of an XML response as the parent data table, therefore the XML response must contain at least one child element under root.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik REST connector all versions&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix the issue, please consider one of the following solutions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Modify the API source to return the only value in a child element under root. For example&amp;nbsp;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;lt;data&amp;gt;&amp;lt;count&amp;gt;123456&amp;lt;/count&amp;gt;&amp;lt;/data&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Load the response as CSV into a single field, then use&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;TextBetween()&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;function to get the necessary value. Sample script is as follows:&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;LIB CONNECT TO 'REST_API_source';&lt;BR /&gt;[CSV_source]:&lt;BR /&gt;LOAD TextBetween(col_1,'&amp;lt;count&amp;gt;','&amp;lt;/count&amp;gt;') as count;&lt;BR /&gt;SQL SELECT&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"col_1"&lt;BR /&gt;FROM CSV (header off, delimiter ",", quote """") "CSV_source";&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 09:45:26 GMT</pubDate>
    <dc:creator>Sonja_Bauernfeind</dc:creator>
    <dc:date>2021-02-24T09:45:26Z</dc:date>
    <item>
      <title>REST connector does not recognize XML format</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/REST-connector-does-not-recognize-XML-format/ta-p/1717826</link>
      <description>&lt;P&gt;When loading XML response from an API source with Qlik REST connector, Qlik Sense fails to recognize the XML response and shows error &lt;I&gt;"Cannot parse data in the selected response type. Check the "Response type" parameter value. XML was not found"&lt;/I&gt;. The file works fine when loaded directly, the issue only happens when loading it via the REST connector.&lt;BR /&gt;The XML response is very simple with only one element, for example the following:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;lt;count&amp;gt;123456&amp;lt;/count&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="https://qlik--c.um1.content.force.com/servlet/servlet.FileDownload?file=0153z0000019Fvs" border="0" alt="Cannot parse data in the selected response type. Check the " /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H4 class="qlik-migrated-tkb-headings"&gt;Cause:&lt;/H4&gt;
&lt;P&gt;REST connector is unable to&amp;nbsp;parse the&amp;nbsp;response because it does not contain any element (only a single value) under root&amp;nbsp;(&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;lt;count&amp;gt;&lt;/SPAN&gt;). Qlik REST connector takes the root element of an XML response as the parent data table, therefore the XML response must contain at least one child element under root.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Qlik REST connector all versions&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix the issue, please consider one of the following solutions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Modify the API source to return the only value in a child element under root. For example&amp;nbsp;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;lt;data&amp;gt;&amp;lt;count&amp;gt;123456&amp;lt;/count&amp;gt;&amp;lt;/data&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Load the response as CSV into a single field, then use&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;TextBetween()&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;function to get the necessary value. Sample script is as follows:&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;LIB CONNECT TO 'REST_API_source';&lt;BR /&gt;[CSV_source]:&lt;BR /&gt;LOAD TextBetween(col_1,'&amp;lt;count&amp;gt;','&amp;lt;/count&amp;gt;') as count;&lt;BR /&gt;SQL SELECT&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;"col_1"&lt;BR /&gt;FROM CSV (header off, delimiter ",", quote """") "CSV_source";&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 09:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/REST-connector-does-not-recognize-XML-format/ta-p/1717826</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2021-02-24T09:45:26Z</dc:date>
    </item>
  </channel>
</rss>

