<?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: Why is Splunk query to extract string inside XML tag not working with spath command? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406510#M26611</link>
    <description>&lt;P&gt;found my own answer.. .rex "]+&amp;gt;(?[^&amp;lt;]+)"&lt;/P&gt;</description>
    <pubDate>Fri, 05 Oct 2018 15:11:42 GMT</pubDate>
    <dc:creator>maximusdm</dc:creator>
    <dc:date>2018-10-05T15:11:42Z</dc:date>
    <item>
      <title>Why is Splunk query to extract string inside XML tag not working with spath command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406509#M26610</link>
      <description>&lt;P&gt;I am using the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=itx "PAD =" | dedup BOC | spath output=Channel path=AsRunMessage.Header.Channel  | table BOC, channel
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which results in events with big XML content .. I need to extract the string "ITX1546" from inside the  tags.&lt;/P&gt;

&lt;P&gt;Also, I need to create a table with distinct rows containing unique BOC values.&lt;/P&gt;

&lt;P&gt;The Channel field is not being populated.&lt;/P&gt;

&lt;P&gt;Here is the XML structure:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5870iB74FF02D3ABD8EA0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Any ideas? Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406509#M26610</guid>
      <dc:creator>maximusdm</dc:creator>
      <dc:date>2018-10-03T18:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk query to extract string inside XML tag not working with spath command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406510#M26611</link>
      <description>&lt;P&gt;found my own answer.. .rex "]+&amp;gt;(?[^&amp;lt;]+)"&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 15:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406510#M26611</guid>
      <dc:creator>maximusdm</dc:creator>
      <dc:date>2018-10-05T15:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk query to extract string inside XML tag not working with spath command?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406511#M26612</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;rex "&amp;lt;Channel [^&amp;gt;]+&amp;gt;(?&amp;lt;Channel&amp;gt;[^&amp;lt;]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 15:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-Splunk-query-to-extract-string-inside-XML-tag-not-working/m-p/406511#M26612</guid>
      <dc:creator>maximusdm</dc:creator>
      <dc:date>2018-10-05T15:13:01Z</dc:date>
    </item>
  </channel>
</rss>

