<?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 Processing multivalue CDATA escaped XML in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Processing-multivalue-CDATA-escaped-XML/m-p/297424#M18802</link>
    <description>&lt;P&gt;I would like to have a table of items, but getting this to work is not working out for me. I think because the raw event is slightly hard for me to process. This is a shortened version of my raw event:&lt;/P&gt;

&lt;P&gt;EDIT: please note that the "&amp;amp; lt;" and "&amp;amp; gt;" markings below are actually without the space, but otherwise the forum would convert them.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[03/29/2017 15:39:00.115 CEST] BLABLA [nl.morenonsense]
&amp;lt;send exit="sendCoolMessage"&amp;gt;
  &amp;lt;message&amp;gt;
    &amp;lt;![CDATA[&amp;amp; lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;amp; gt;
      &amp;amp; lt;SendCoolMsg xmlns="http://www.website.com"&amp;amp; gt;
        &amp;amp; lt;CoolAMsg&amp;amp; gt;
          &amp;amp; lt;?xml version="1.0" encoding="UTF-8"?&amp;amp; gt;
          &amp;amp; lt;Items&amp;amp; gt;
            &amp;amp; lt;Item1&amp;amp; gt;
              &amp;amp; lt;information&amp;amp; gt;numbers and stuff&amp;amp; lt;/information&amp;amp; gt;
              &amp;amp; lt;coolthings&amp;amp; gt;strings&amp;amp; lt;/coolthings&amp;amp; gt;
            &amp;amp; lt;/Item1&amp;amp; gt;
            &amp;amp; lt;Item2&amp;amp; gt;
              &amp;amp; lt;information&amp;amp; gt;numbers2 and stuff2&amp;amp; lt;/information&amp;amp; gt;
              &amp;amp; lt;coolthings&amp;amp; gt;strings2&amp;amp; lt;/coolthings&amp;amp; gt;
            &amp;amp; lt;/Item2&amp;amp; gt;
          &amp;amp; lt;/Items&amp;amp; gt;
        &amp;amp; lt;/CoolAmsg&amp;amp; gt;
      &amp;amp; lt;/SendCoolMsg&amp;amp; gt;
    ]]&amp;gt;
  &amp;lt;/message&amp;gt;
&amp;lt;/send&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like to end up with a table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;       information coolthings
item1              
item2              
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can access the fields (like &lt;CODE&gt;information&lt;/CODE&gt;) using &lt;CODE&gt;xmlkv&lt;/CODE&gt; but I haven't been able to get &lt;CODE&gt;spath&lt;/CODE&gt; to find anything. I have tried using &lt;CODE&gt;rex&lt;/CODE&gt; to first isolate the inner xml but it seems to only give back results if there is just a string and not any tag for some reason.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search | xmlkv | table _time, information&lt;/CODE&gt; will only give me the information of the first item, I need it to do something multivalued.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search | rex field=_raw "&amp;amp;lt;informatie&amp;amp;gt;(?&amp;lt;Inf&amp;gt;.*)&amp;amp;lt;/informatie&amp;amp;gt;" max_match=0 | mvexpand Inf | table _time, Inf&lt;/CODE&gt; now we have the expanded multivaluedness. But the next step is to use the information in &lt;CODE&gt;coolthings&lt;/CODE&gt; to filter. If it is &lt;CODE&gt;strings2&lt;/CODE&gt; the &lt;CODE&gt;information&lt;/CODE&gt; shouldn't show up. And I don't know how to get there if I can't use the XML structure. Also the event usually has over 15000 characters (sometimes over 30000), if that is a limit somewhere.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 14:49:12 GMT</pubDate>
    <dc:creator>Bob_Bard</dc:creator>
    <dc:date>2017-03-29T14:49:12Z</dc:date>
    <item>
      <title>Processing multivalue CDATA escaped XML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Processing-multivalue-CDATA-escaped-XML/m-p/297424#M18802</link>
      <description>&lt;P&gt;I would like to have a table of items, but getting this to work is not working out for me. I think because the raw event is slightly hard for me to process. This is a shortened version of my raw event:&lt;/P&gt;

&lt;P&gt;EDIT: please note that the "&amp;amp; lt;" and "&amp;amp; gt;" markings below are actually without the space, but otherwise the forum would convert them.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[03/29/2017 15:39:00.115 CEST] BLABLA [nl.morenonsense]
&amp;lt;send exit="sendCoolMessage"&amp;gt;
  &amp;lt;message&amp;gt;
    &amp;lt;![CDATA[&amp;amp; lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;amp; gt;
      &amp;amp; lt;SendCoolMsg xmlns="http://www.website.com"&amp;amp; gt;
        &amp;amp; lt;CoolAMsg&amp;amp; gt;
          &amp;amp; lt;?xml version="1.0" encoding="UTF-8"?&amp;amp; gt;
          &amp;amp; lt;Items&amp;amp; gt;
            &amp;amp; lt;Item1&amp;amp; gt;
              &amp;amp; lt;information&amp;amp; gt;numbers and stuff&amp;amp; lt;/information&amp;amp; gt;
              &amp;amp; lt;coolthings&amp;amp; gt;strings&amp;amp; lt;/coolthings&amp;amp; gt;
            &amp;amp; lt;/Item1&amp;amp; gt;
            &amp;amp; lt;Item2&amp;amp; gt;
              &amp;amp; lt;information&amp;amp; gt;numbers2 and stuff2&amp;amp; lt;/information&amp;amp; gt;
              &amp;amp; lt;coolthings&amp;amp; gt;strings2&amp;amp; lt;/coolthings&amp;amp; gt;
            &amp;amp; lt;/Item2&amp;amp; gt;
          &amp;amp; lt;/Items&amp;amp; gt;
        &amp;amp; lt;/CoolAmsg&amp;amp; gt;
      &amp;amp; lt;/SendCoolMsg&amp;amp; gt;
    ]]&amp;gt;
  &amp;lt;/message&amp;gt;
&amp;lt;/send&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like to end up with a table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;       information coolthings
item1              
item2              
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can access the fields (like &lt;CODE&gt;information&lt;/CODE&gt;) using &lt;CODE&gt;xmlkv&lt;/CODE&gt; but I haven't been able to get &lt;CODE&gt;spath&lt;/CODE&gt; to find anything. I have tried using &lt;CODE&gt;rex&lt;/CODE&gt; to first isolate the inner xml but it seems to only give back results if there is just a string and not any tag for some reason.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search | xmlkv | table _time, information&lt;/CODE&gt; will only give me the information of the first item, I need it to do something multivalued.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search | rex field=_raw "&amp;amp;lt;informatie&amp;amp;gt;(?&amp;lt;Inf&amp;gt;.*)&amp;amp;lt;/informatie&amp;amp;gt;" max_match=0 | mvexpand Inf | table _time, Inf&lt;/CODE&gt; now we have the expanded multivaluedness. But the next step is to use the information in &lt;CODE&gt;coolthings&lt;/CODE&gt; to filter. If it is &lt;CODE&gt;strings2&lt;/CODE&gt; the &lt;CODE&gt;information&lt;/CODE&gt; shouldn't show up. And I don't know how to get there if I can't use the XML structure. Also the event usually has over 15000 characters (sometimes over 30000), if that is a limit somewhere.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 14:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Processing-multivalue-CDATA-escaped-XML/m-p/297424#M18802</guid>
      <dc:creator>Bob_Bard</dc:creator>
      <dc:date>2017-03-29T14:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Processing multivalue CDATA escaped XML</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Processing-multivalue-CDATA-escaped-XML/m-p/297425#M18803</link>
      <description>&lt;P&gt;In the end we solved it by exporting all these events and processing them locally with scripts.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 12:06:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Processing-multivalue-CDATA-escaped-XML/m-p/297425#M18803</guid>
      <dc:creator>Bob_Bard</dc:creator>
      <dc:date>2017-04-04T12:06:55Z</dc:date>
    </item>
  </channel>
</rss>

