Splunk Search

How can I extract these XML values and table them?

kaushik1218
New Member

For example below is my XML

<serviceType>xxx</serviceType>
<some stuff>
<some more stuff>
<code>D</code>

Now I need above thing "xxx" as field to the value "D" to be extracted and displayed as below in table format

xxx
D

Can someone please help me here. Thanks in advance

0 Karma
1 Solution

azamir_splunk
Splunk Employee
Splunk Employee

You can try using KV_MODE = XML in props.conf or use the SPATH command, you can also create a REGEX rule in transforms.conf, depending on what is easier for you to do.

Hope this helps.

View solution in original post

0 Karma

azamir_splunk
Splunk Employee
Splunk Employee

You can try using KV_MODE = XML in props.conf or use the SPATH command, you can also create a REGEX rule in transforms.conf, depending on what is easier for you to do.

Hope this helps.

0 Karma

kaushik1218
New Member

Thanks for your response 🙂

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...