Splunk Dev

Output XML formatting

A_bhijeet
Loves-to-Learn

Hello everyone I am very new to splunk. 

I have created an app in splunk in which there's a Dashboard which fetches me an XML whenever I enter the order number, now the result I am getting is fine, but the the output XML is not in proper format. it comes in asingle line, is there a way to manipulate my result in a proper format?

for example. 

i want it like 

orderStatusReply xmlns="blabla.blabla" transactionId="blabla" timestamp="2020-07-09T15:49:36.649Z">
<result>
<resultType>success</resultType>
</result>
<orderStatus type="history">
<customer mailConfirmationRequired="false">
<customerNumber>blabla blabla</customerNumber>
<customerName>blabla</customerName>
<printReceipt>blabla</printReceipt>
</customer>
<centerNumber>blabla</centerNumber>
<containsItemPaymentAdjustment>false</containsItemPaymentAdjustment>
<orderNumber>1111111111111111</orderNumber>
<referenceNumber>11111111111111111111</referenceNumber> ..

...

but it comes like 

orderStatusReply xmlns="blabla.blabla" transactionId="blabla" timestamp="2020-07-09T15:49:36.649Z"><result><resultType>success</resultType></result><orderStatus type="history"><customer mailConfirmationRequired="false"><customerNumber>blabla blabla</customerNumber><customerName>blabla</customerName><printReceipt>blabla</printReceipt>
</customer><centerNumber>blabla</centerNumber><containsItemPaymentAdjustment>false</containsItemPaymentAdjustment<orderNumber>1111111111111111</orderNumber><referenceNumber>11111111111111111111</referenceNumber>

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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