I want any method or a way to convert a text file into XML file using SPLUNK
An XML file is a text file.
Why do you want to use Splunk to do this? What is your use case?