Splunk Search

Using if condition in input and path fields of spath

sasireka
Loves-to-Learn Lots

I have an xml file and using spath for it.

My xml is having a tag like:
<messages>
<name>test1</name>
<message-a>
<cust-id>cust-1</cust-id>
<part-a>name-1</part-a>
<part-b>name-2</part-b>
</message-a>
<message-b>
<cust-id>cust-2</cust-id>
<part-a>name-1</part-a>
<part-b>name-2</part-b>
</message-b>
<messages>

I want to use a if condition in both input and path fields of spath

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

On the face of it, I don't think what you are asking for is possible. Perhaps if you could explain what it is you are trying to achieve e.g. what are you trying to extract from the XML, someone may be able to assist you more readily.

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...