<?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: XML Extraction in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145973#M8895</link>
    <description>&lt;P&gt;I like this solution using transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[views_std]
MV_ADD = 1
REGEX = \&amp;lt;(\w+[^\n\/\&amp;gt;]+)\/?\&amp;gt;([^\&amp;lt;\n][^\&amp;lt;]*)\&amp;lt;
FORMAT = $1::$2
CLEAN_KEYS = true

[views_param]
MV_ADD = 1
REGEX = \&amp;lt;(\w+ [^\n\/\&amp;gt;]+)\/?\&amp;gt;
FORMAT = param::$1
CLEAN_KEYS = true

[views_option]
MV_ADD = 1
SOURCE_KEY = param
REGEX = (\w+(?: \w+)*)="(?!host|source|sourcetype|index|splunk_server)(\w+)"
FORMAT = $1::$2
CLEAN_KEYS = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Oct 2016 13:48:32 GMT</pubDate>
    <dc:creator>landen99</dc:creator>
    <dc:date>2016-10-05T13:48:32Z</dc:date>
    <item>
      <title>XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145965#M8887</link>
      <description>&lt;P&gt;I have a datasource that reads in events in XML format. Could someone please help me build a props.conf that will extract all fields and show the events in treeview. Sample event below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mon Apr 28 16:45:57 EDT 2014 name="TOPIC_msg_received" event_id="ID:404040" msg_dest="SplunkTopic" msg_body="&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;ELLogInputLayout xmlns="http://www.test.com/1"&amp;gt;&amp;lt;ELLogInputMessage&amp;gt;    &amp;lt;Header&amp;gt;      &amp;lt;LogEventTypeCode&amp;gt;ERROR&amp;lt;/LogEventTypeCode&amp;gt;      &amp;lt;LogSeverityCode&amp;gt;CRITICAL&amp;lt;/LogSeverityCode&amp;gt;      &amp;lt;LogEventDateTime&amp;gt;9999-12-31T23:59:59.9999999-05:00&amp;lt;/LogEventDateTime&amp;gt;    &amp;lt;/Header&amp;gt;    &amp;lt;SourceInformation&amp;gt;      &amp;lt;EAPMId&amp;gt;2&amp;lt;/EAPMId&amp;gt;      &amp;lt;HostMachineName&amp;gt;HostMachineName3&amp;lt;/HostMachineName&amp;gt;      &amp;lt;HostEnvironmentName&amp;gt;HostEnvironmentName3&amp;lt;/HostEnvironmentName&amp;gt;      &amp;lt;ComponentId&amp;gt;ComponentId3&amp;lt;/ComponentId&amp;gt;      &amp;lt;ComponentName&amp;gt;ComponentName3&amp;lt;/ComponentName&amp;gt;      &amp;lt;ApplicationEventCorrelationId&amp;gt;ApplicationEventCorrelationId3&amp;lt;/ApplicationEventCorrelationId&amp;gt;      &amp;lt;UserId&amp;gt;UserId3&amp;lt;/UserId&amp;gt;      &amp;lt;UserSrc&amp;gt;UserSrc3&amp;lt;/UserSrc&amp;gt;      &amp;lt;BusinessDomainId&amp;gt;BusinessDomainId3&amp;lt;/BusinessDomainId&amp;gt;      &amp;lt;BusinessDomainName&amp;gt;BusinessDomainName3&amp;lt;/BusinessDomainName&amp;gt;    &amp;lt;/SourceInformation&amp;gt;    &amp;lt;ErrorInformation&amp;gt;      &amp;lt;ErrorCode&amp;gt;ErrorCode3&amp;lt;/ErrorCode&amp;gt;      &amp;lt;ErrorDescription&amp;gt;ErrorDescription3&amp;lt;/ErrorDescription&amp;gt;&amp;lt;DetailedErrorInformation&amp;gt;DetailedErrorInformation3&amp;lt;/DetailedErrorInformation&amp;gt;    &amp;lt;/ErrorInformation&amp;gt;    &amp;lt;DetailedLogInformation&amp;gt;anyType&amp;lt;/DetailedLogInformation&amp;gt;   &amp;lt;/ELLogInputMessage&amp;gt;&amp;lt;/ELLogInputLayout&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145965#M8887</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2014-04-29T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145966#M8888</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Have your tried KV_MODE = XML in props.conf ??&lt;/P&gt;

&lt;P&gt;From docs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KV_MODE = [none|auto|multi|json|xml]
* Used for search-time field extractions only.
* Specifies the field/value extraction mode for the data.
* Set KV_MODE to one of the following:
        * none: if you want no field/value extraction to take place.
        * auto: extracts field/value pairs separated by equal signs.
        * multi: invokes the multikv search command to expand a tabular event into multiple events.
    * xml : automatically extracts fields from XML data.
    * json: automatically extracts fields from JSON data.
* Setting to 'none' can ensure that one or more user-created regexes are not overridden by
  automatic field/value extraction for a particular host, source, or source type, and also
  increases search performance.
* Defaults to auto.
* The 'xml' and 'json' modes will not extract any fields when used on data that isn't of the correct format (JSON or XML).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Apr 2014 14:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145966#M8888</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2014-04-29T14:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145967#M8889</link>
      <description>&lt;P&gt;This may not work as the event is not pure xml (its a combination of key value pair with embedded xml). You might have to extract all xml fields using field extractor.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145967#M8889</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-29T15:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145968#M8890</link>
      <description>&lt;P&gt;Yes, I tried using KV_MODE = XML but it is not picking up. Is the only way to do individual field extraction?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:04:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145968#M8890</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2014-04-29T15:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145969#M8891</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourSourceType]
NO_BINARY_CHECK = 1
TIME_FORMAT = %a %b %d %H:%M:%S %T %Y
pulldown_type = 1
REPORT-xmlkv = xmlkv-alternative
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xmlkv-alternative]
REGEX = &amp;lt;([^\s\&amp;gt;]*)[^\&amp;gt;]*\&amp;gt;([^&amp;lt;]*)\&amp;lt;\/\1\&amp;gt;
FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Apr 2014 15:18:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145969#M8891</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-29T15:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145970#M8892</link>
      <description>&lt;P&gt;That extracted all the fields, thanks! Wish there was a way to get a pull down view but this will do the trick if that's not possible.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 16:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145970#M8892</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2014-04-29T16:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145971#M8893</link>
      <description>&lt;P&gt;Could you be more specific what you mean by pull down view?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 21:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145971#M8893</guid>
      <dc:creator>rahulroy_splunk</dc:creator>
      <dc:date>2014-04-29T21:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145972#M8894</link>
      <description>&lt;P&gt;when you have an input that is true json or xml you can have the view of the events in a tree structure where you hit the + sign to see nested information.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2014 14:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145972#M8894</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2014-05-06T14:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145973#M8895</link>
      <description>&lt;P&gt;I like this solution using transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[views_std]
MV_ADD = 1
REGEX = \&amp;lt;(\w+[^\n\/\&amp;gt;]+)\/?\&amp;gt;([^\&amp;lt;\n][^\&amp;lt;]*)\&amp;lt;
FORMAT = $1::$2
CLEAN_KEYS = true

[views_param]
MV_ADD = 1
REGEX = \&amp;lt;(\w+ [^\n\/\&amp;gt;]+)\/?\&amp;gt;
FORMAT = param::$1
CLEAN_KEYS = true

[views_option]
MV_ADD = 1
SOURCE_KEY = param
REGEX = (\w+(?: \w+)*)="(?!host|source|sourcetype|index|splunk_server)(\w+)"
FORMAT = $1::$2
CLEAN_KEYS = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Oct 2016 13:48:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145973#M8895</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2016-10-05T13:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extraction</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145974#M8896</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a .log file which has mix of system logs and in between request &amp;amp; response XMLs of actual transactions going within my application. I only want those XML transactions only to be shown in splunk and do not want to see the other logging information. Is there a way to achieve this?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 10:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Extraction/m-p/145974#M8896</guid>
      <dc:creator>poddraj</dc:creator>
      <dc:date>2019-11-25T10:04:25Z</dc:date>
    </item>
  </channel>
</rss>

