<?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: How to extract Major_Brand_Display_Name value from xml in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218569#M176226</link>
    <description>&lt;P&gt;Hi gokadroid &lt;/P&gt;

&lt;P&gt;As per privacy policy,i removed original data.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2016 04:28:32 GMT</pubDate>
    <dc:creator>kirankotla</dc:creator>
    <dc:date>2016-11-14T04:28:32Z</dc:date>
    <item>
      <title>How to extract Major_Brand_Display_Name value from xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218564#M176221</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;           &amp;lt;EmailAddress&amp;gt;RON@xyz.COM&amp;lt;/EmailAddress&amp;gt;
           &amp;lt;Attributes&amp;gt;
              &amp;lt;Name&amp;gt;Addressee_Name&amp;lt;/Name&amp;gt;
              &amp;lt;Value&amp;gt;bng&amp;lt;/Value&amp;gt;
           &amp;lt;/Attributes&amp;gt;
           &amp;lt;Attributes&amp;gt;
              &amp;lt;Name&amp;gt;xyz&amp;lt;/Name&amp;gt;
              &amp;lt;Value&amp;gt;xyz&amp;lt;/Value&amp;gt;
           &amp;lt;/Attributes&amp;gt;

           &amp;lt;Attributes&amp;gt;
              &amp;lt;Name&amp;gt;pqr&amp;lt;/Name&amp;gt;
              &amp;lt;Value&amp;gt;&amp;lt;/Value&amp;gt;
           &amp;lt;/Attributes&amp;gt;
           &amp;lt;Attributes&amp;gt;
              &amp;lt;Name&amp;gt;xxxx&amp;lt;/Name&amp;gt;
              &amp;lt;Value&amp;gt;zzzz&amp;lt;/Value&amp;gt;
           &amp;lt;/Attributes&amp;gt;

        &amp;lt;/Subscribers&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Nov 2016 00:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218564#M176221</guid>
      <dc:creator>kirankotla</dc:creator>
      <dc:date>2016-11-13T00:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Major_Brand_Display_Name value from xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218565#M176222</link>
      <description>&lt;P&gt;If all of this is a part of single event and you want to extract any one of the above tag name or tag values then just replace the last line of the below query with that tag name exa. &lt;CODE&gt;| where tagName="Major_Brand_Display_Name | fields - tagName"&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourIndex sourcetype=yourSourcetype earliest=-7d@d
| rex field=_raw max_match=0 "\&amp;lt;Name\&amp;gt;(?&amp;lt;name&amp;gt;[^\&amp;lt;]+)&amp;lt;\/Name\&amp;gt;" 
| rex field=_raw max_match=0 "\&amp;lt;Value\&amp;gt;(?&amp;lt;value&amp;gt;[^\&amp;lt;]+)\&amp;lt;\/Value\&amp;gt;" 
| eval z=mvzip(name, value, "~") 
| mvexpand z 
| rex field=z "(?&amp;lt;tagName&amp;gt;[^~]+)~(?&amp;lt;tagValue&amp;gt;.*)" 
| table _time, tagName, tagValue 
| where tagName="Major_Brand_Display_Name"
| chart count(tagValue) over _time by tagValue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Updating as per comments&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2016 02:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218565#M176222</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-13T02:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Major_Brand_Display_Name value from xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218566#M176223</link>
      <description>&lt;P&gt;Awesome! thank you so much.&lt;BR /&gt;
Is it possible to use timechat based on Major_Brand_Display_Name  line  timechart span=7d count by Major_Brand_Display_Name   &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218566#M176223</guid>
      <dc:creator>kirankotla</dc:creator>
      <dc:date>2020-09-29T11:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Major_Brand_Display_Name value from xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218567#M176224</link>
      <description>&lt;P&gt;Firstly choose either the time picker for last 7 days or in your query add the &lt;CODE&gt;earliest=-7d@d&lt;/CODE&gt;in the first line where you search &lt;CODE&gt;your query to get the above xml data as event&lt;/CODE&gt; as something like &lt;CODE&gt;index=yourIndex sourcetype=yourSourcetype earliest=-7d@d&lt;/CODE&gt;. After that change the last three lines of query as follows where you add the &lt;CODE&gt;_time&lt;/CODE&gt; in &lt;CODE&gt;table&lt;/CODE&gt; first, and then chart it later on:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table _time, tagName, tagValue 
| where tagName="Major_Brand_Display_Name"
| chart count(tagValue) over _time by tagValue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this works well then please accept the answer and upvote so the question can be closed.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2016 03:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218567#M176224</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-13T03:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Major_Brand_Display_Name value from xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218568#M176225</link>
      <description>&lt;P&gt;I am down voting this as the question data has been changed after answering the question.  the answer given below was for the earlier data (xml tags and values) and it seemed to have work fine for &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/203496"&gt;@kirankotla&lt;/a&gt; as per  user's comments. now at its current state the xml data in question is not intuitive for community users to answer this question and lacks info as to where does "major_brand_display_name" exist as part of xml. Is it a  tag &lt;CODE&gt;&amp;lt;Name&amp;gt;&lt;/CODE&gt; for which a &lt;CODE&gt;&amp;lt;Value&amp;gt;&lt;/CODE&gt; is required or this text exists as part of &lt;CODE&gt;&amp;lt;Value&amp;gt;&lt;/CODE&gt;  itself and needs an extraction?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218568#M176225</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2020-09-29T11:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Major_Brand_Display_Name value from xml</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218569#M176226</link>
      <description>&lt;P&gt;Hi gokadroid &lt;/P&gt;

&lt;P&gt;As per privacy policy,i removed original data.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 04:28:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-Major-Brand-Display-Name-value-from-xml/m-p/218569#M176226</guid>
      <dc:creator>kirankotla</dc:creator>
      <dc:date>2016-11-14T04:28:32Z</dc:date>
    </item>
  </channel>
</rss>

