<?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: Extract from XML. Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/1622816#M714722</link>
    <description>&lt;P&gt;Thanks a lot for the Tips!&lt;/P&gt;&lt;P&gt;We tried a lot to cover all cases&amp;nbsp; in our XML , but we found a lot of mistakes in our qlik data. End the end it helped to build a simple XML for the creation of the LOAD script with all the cases. I guess, that Qlickview will import a couple of cases, till the pattern fits a number of times. If in a big XML other cases will occure in the later part of the file, it will not be covered by the LOAD creation script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So we created, out of the production data, a shorter XML in which the repititations of the knots and attributes are shown. We see, that the LOAD-Scripts were be different with every new case we added to the xml.&lt;/P&gt;&lt;P&gt;So yes, the combination of the two tips will be the solution to a lot of questions out there in the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 20:15:59 GMT</pubDate>
    <dc:creator>umfoeqlik</dc:creator>
    <dc:date>2019-09-11T20:15:59Z</dc:date>
    <item>
      <title>Extract from XML. Help</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/205636#M714719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;category id="15" desc="Rent_a_car_facility"&amp;gt;&lt;BR /&gt;&amp;lt;name language="danish"&amp;gt;Biludlejningssted&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;name language="german"&amp;gt;Autoverleih&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;name language="english"&amp;gt;Car rental&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;/category&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to extract out the info from the xml file.&lt;/P&gt;&lt;P&gt;Extract out info on language and its value. eg "english" and the value is "car rental". I used the xml file wizard but I cant link "english" with "car rental"&lt;/P&gt;&lt;P&gt;How do I do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 16:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/205636#M714719</guid>
      <dc:creator />
      <dc:date>2009-10-02T16:33:54Z</dc:date>
    </item>
    <item>
      <title>Extract from XML. Help</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/205637#M714720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I did some quick reverse-engineering on the XmlSimple syntax (working on an issue with XML imports myself as well).&lt;/P&gt;&lt;P&gt;What works for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Directory;&lt;BR /&gt;category:&lt;BR /&gt;LOAD id,&lt;BR /&gt; desc,&lt;BR /&gt; %Key_category_08D4710147D4EF99 // Key for this table: category&lt;BR /&gt;FROM [extractje XML.xml] (XmlSimple, Table is [category]);&lt;BR /&gt;// End of [extractje XML.xml] LOAD statements&lt;BR /&gt;&lt;BR /&gt;name:&lt;BR /&gt;LOAD&lt;BR /&gt; %Key_category_08D4710147D4EF99, // Key of 'category' table&lt;BR /&gt; language,&lt;BR /&gt; name%Table as value&lt;BR /&gt;FROM [extractje XML.xml] (XmlSimple, Table is [category/name]);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The 'category' table script is automatically generated by the script wizard; the 'name' table was built by hand based on the other code that was generated by the script wizard (which I deleted in the example code!).&lt;/P&gt;&lt;P&gt;Things to note in the 'name' table script:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;you're reading 1 row for each category/name node in the source XML -&amp;gt; put 'Table is [category/name]' in the 'FROM' part&lt;/LI&gt;&lt;LI&gt;you're reading the translated text from the node's contents (and not from a node attribute) -&amp;gt; this is accessible as {nodename}%Table (e.g. 'name%Table') in the script&lt;/LI&gt;&lt;LI&gt;you're reading the language from a node attribute -&amp;gt; this is accessible as a 'column' {attribute-name} (e.g. 'language') in the script&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The resulting code will generate a 'category' table with one row containing the values of the 'id' and 'desc' attributes of the root node, and a 'name' table containing the values of the 'language' attribute and the contents of the 'name' nodes.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Martijn&lt;/P&gt;&lt;P&gt;PS: I can't find any documentation on the syntax of load scripts for XML (neither XmlSimple nor XmlSax); does anyone know where to find documentation on these?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2009 17:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/205637#M714720</guid>
      <dc:creator />
      <dc:date>2009-12-18T17:05:30Z</dc:date>
    </item>
    <item>
      <title>Extract from XML. Help</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/205638#M714721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A short reply-to-self &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;P&gt;QlikView support confirmed that there is no documentation for the script syntax used when reading XML...&lt;/P&gt;&lt;P&gt;We specifically discussed the autogenerated keys; there is no way at the moment to generate these by hand, and R&amp;amp;D &lt;I&gt;might&lt;/I&gt; add something for this in QV 10.&lt;/P&gt;&lt;P&gt;Some useful tips:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When reading multiple XMLs, the counter used for autogenerated keys restarts with each new file -&amp;gt; build your own key based on the autogenerated key and the filename (e.g. 'autonumber(%key_fieldname_1234567890ABCDEF, $(vFilename))' )&lt;/LI&gt;&lt;LI&gt;Create some template XML in which &lt;B&gt;all&lt;/B&gt; items in the XML Schema are present (and multiple times for items that can appear multiple times), and let QlikView generate the script for this file; then edit the generated script&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martijn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 13:04:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/205638#M714721</guid>
      <dc:creator />
      <dc:date>2010-01-21T13:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract from XML. Help</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/1622816#M714722</link>
      <description>&lt;P&gt;Thanks a lot for the Tips!&lt;/P&gt;&lt;P&gt;We tried a lot to cover all cases&amp;nbsp; in our XML , but we found a lot of mistakes in our qlik data. End the end it helped to build a simple XML for the creation of the LOAD script with all the cases. I guess, that Qlickview will import a couple of cases, till the pattern fits a number of times. If in a big XML other cases will occure in the later part of the file, it will not be covered by the LOAD creation script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So we created, out of the production data, a shorter XML in which the repititations of the knots and attributes are shown. We see, that the LOAD-Scripts were be different with every new case we added to the xml.&lt;/P&gt;&lt;P&gt;So yes, the combination of the two tips will be the solution to a lot of questions out there in the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 20:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-from-XML-Help/m-p/1622816#M714722</guid>
      <dc:creator>umfoeqlik</dc:creator>
      <dc:date>2019-09-11T20:15:59Z</dc:date>
    </item>
  </channel>
</rss>

