<?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 Reading XML file into ESP project in Streaming Analytics</title>
    <link>https://communities.sas.com/t5/Streaming-Analytics/Reading-XML-file-into-ESP-project/m-p/478644#M68</link>
    <description>&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;Hi.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;I have been wrestling in understanding how ESP file system adapter reads data from XML file.&amp;nbsp; I have a xml file for example:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;document&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;&amp;lt;queryid&amp;gt;1&amp;lt;/queryid&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;lt;events&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;lt;event&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;eventsequence&amp;gt;1123&amp;lt;/eventsequence&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;/event&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;/events&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;/document&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;My current understanding is that tags &amp;lt;event&amp;gt;&amp;lt;events&amp;gt; cannot be nested inside another tag. They must be first tags. Am I correct? Because when I remove &amp;lt;document&amp;gt; tag then ESP can read XML succesfully.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;Second observation: if I have a nested tag inside event tag then ESP will read values inside those tags not tags and values. For example&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&amp;lt;dog&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;lt;name&amp;gt;Boss&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;weight&amp;gt;67&amp;lt;/weight&amp;gt;&lt;BR /&gt;&amp;lt;/dog&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;will be read as&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;lt;value name='dog'&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Boss&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;67&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp;&amp;lt;/value&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;But when I include&amp;nbsp;&amp;lt;![CDATA[&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;nbsp;between &amp;lt;dog&amp;gt; and &amp;lt;/dog&amp;gt; then tags and values are read correctly.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;lt;value name='&lt;SPAN&gt;dog&lt;/SPAN&gt;'&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&amp;lt;name&amp;gt;Boss&amp;lt;/name&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&amp;lt;weight&amp;gt;67&amp;lt;/weight&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;lt;/value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;This second approach allows me to use functional window and parse nested XML. My aim is to understand if it's possible to read XML generated by third party application or do I need to have some requirements in place for that application so it produces XML that ESP can read.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jul 2018 13:36:26 GMT</pubDate>
    <dc:creator>Rain</dc:creator>
    <dc:date>2018-07-17T13:36:26Z</dc:date>
    <item>
      <title>Reading XML file into ESP project</title>
      <link>https://communities.sas.com/t5/Streaming-Analytics/Reading-XML-file-into-ESP-project/m-p/478644#M68</link>
      <description>&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;Hi.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;I have been wrestling in understanding how ESP file system adapter reads data from XML file.&amp;nbsp; I have a xml file for example:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;document&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp;&amp;lt;queryid&amp;gt;1&amp;lt;/queryid&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;lt;events&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;lt;event&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;eventsequence&amp;gt;1123&amp;lt;/eventsequence&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;/event&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;/events&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&amp;lt;/document&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;My current understanding is that tags &amp;lt;event&amp;gt;&amp;lt;events&amp;gt; cannot be nested inside another tag. They must be first tags. Am I correct? Because when I remove &amp;lt;document&amp;gt; tag then ESP can read XML succesfully.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;Second observation: if I have a nested tag inside event tag then ESP will read values inside those tags not tags and values. For example&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&amp;lt;dog&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;lt;name&amp;gt;Boss&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;weight&amp;gt;67&amp;lt;/weight&amp;gt;&lt;BR /&gt;&amp;lt;/dog&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;will be read as&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;lt;value name='dog'&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Boss&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;67&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp;&amp;lt;/value&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;But when I include&amp;nbsp;&amp;lt;![CDATA[&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;nbsp;between &amp;lt;dog&amp;gt; and &amp;lt;/dog&amp;gt; then tags and values are read correctly.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;lt;value name='&lt;SPAN&gt;dog&lt;/SPAN&gt;'&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&amp;lt;name&amp;gt;Boss&amp;lt;/name&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&amp;lt;weight&amp;gt;67&amp;lt;/weight&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;lt;/value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" size="2"&gt;This second approach allows me to use functional window and parse nested XML. My aim is to understand if it's possible to read XML generated by third party application or do I need to have some requirements in place for that application so it produces XML that ESP can read.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 13:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Streaming-Analytics/Reading-XML-file-into-ESP-project/m-p/478644#M68</guid>
      <dc:creator>Rain</dc:creator>
      <dc:date>2018-07-17T13:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading XML file into ESP project</title>
      <link>https://communities.sas.com/t5/Streaming-Analytics/Reading-XML-file-into-ESP-project/m-p/480796#M73</link>
      <description>&lt;P&gt;If your input XML format does not match ESP standard input event XML format, then the best practice&amp;nbsp;is to use your 2nd approach, parsing it in a functional window. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 14:10:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Streaming-Analytics/Reading-XML-file-into-ESP-project/m-p/480796#M73</guid>
      <dc:creator>FredCombaneyre</dc:creator>
      <dc:date>2018-07-24T14:10:06Z</dc:date>
    </item>
  </channel>
</rss>

