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!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...