<?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 from_field for extracting xml-values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/from-field-for-extracting-xml-values/m-p/266525#M709666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I access a ssrs reporting server to retrieve information on published reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query returns an XML with the embedded report information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can capture the report definition with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Reports:&lt;/P&gt;&lt;P&gt;SELECT Name, CAST(CAST(Content AS VARBINARY(MAX)) AS XML) AS ReportXML&lt;/P&gt;&lt;P&gt;from &amp;lt;my_SQL_table&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I currently use a macro to dump the XML-Data back into report files and used the Table Files Wizard to get the XML values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LOAD xmlns:rd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width&lt;/P&gt;&lt;P&gt;FROM &amp;lt;my_dump_file&amp;gt; (XmlSimple, Table is [Report]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then read about the "from_field" command and thought I could circumvent the macro step and simply read from the above "ReportXML" field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LOAD xmlns:rd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width&lt;/P&gt;&lt;P&gt;FROM_FIELD (Reports, ReportXML) (XmlSimple, Table is [Report]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This however gives me an "Unknown Error in MSXML".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example I found used @1 to refer to the FROM_FIELD content but I can't figure out how to script that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2011 14:32:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-21T14:32:49Z</dc:date>
    <item>
      <title>from_field for extracting xml-values</title>
      <link>https://community.qlik.com/t5/QlikView/from-field-for-extracting-xml-values/m-p/266525#M709666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I access a ssrs reporting server to retrieve information on published reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query returns an XML with the embedded report information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can capture the report definition with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Reports:&lt;/P&gt;&lt;P&gt;SELECT Name, CAST(CAST(Content AS VARBINARY(MAX)) AS XML) AS ReportXML&lt;/P&gt;&lt;P&gt;from &amp;lt;my_SQL_table&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I currently use a macro to dump the XML-Data back into report files and used the Table Files Wizard to get the XML values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LOAD xmlns:rd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width&lt;/P&gt;&lt;P&gt;FROM &amp;lt;my_dump_file&amp;gt; (XmlSimple, Table is [Report]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then read about the "from_field" command and thought I could circumvent the macro step and simply read from the above "ReportXML" field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LOAD xmlns:rd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width&lt;/P&gt;&lt;P&gt;FROM_FIELD (Reports, ReportXML) (XmlSimple, Table is [Report]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This however gives me an "Unknown Error in MSXML".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example I found used @1 to refer to the FROM_FIELD content but I can't figure out how to script that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 14:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/from-field-for-extracting-xml-values/m-p/266525#M709666</guid>
      <dc:creator />
      <dc:date>2011-10-21T14:32:49Z</dc:date>
    </item>
  </channel>
</rss>

