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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...