BookmarkSubscribeRSS Feed
Rain
Obsidian | Level 7

Hi.

 

I have been wrestling in understanding how ESP file system adapter reads data from XML file.  I have a xml file for example:

<document>
   <queryid>1</queryid>
  <events>
  <event>

    <eventsequence>1123</eventsequence>
</event>
</events>
</document>

 

My current understanding is that tags <event><events> cannot be nested inside another tag. They must be first tags. Am I correct? Because when I remove <document> tag then ESP can read XML succesfully.


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 
<dog>

<name>Boss</name>
<weight>67</weight>
</dog>


will be read as 

<value name='dog'>

                                Boss

                                67

 </value>


But when I include <![CDATA[    ]]> between <dog> and </dog> then tags and values are read correctly.

 


<value name='dog'>
<name>Boss</name>
<weight>67</weight>
</value>

 

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.

1 REPLY 1
FredCombaneyre
SAS Employee

If your input XML format does not match ESP standard input event XML format, then the best practice is to use your 2nd approach, parsing it in a functional window.  

Hope this helps

Fred

Whether you're already using SAS Event Stream Processing or thinking about it, this is where you can connect with your peers, ask questions and find resources.

 

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1673 views
  • 0 likes
  • 2 in conversation