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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...