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!

Splunk Enterprise Security 8.0.2 Availability: On cloud and On-premise!

A few months ago, we released Splunk Enterprise Security 8.0 for our cloud customers. Today, we are excited to ...

Logs to Metrics

Logs and Metrics Logs are generally unstructured text or structured events emitted by applications and written ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...