How to write xml line break

Hi dear, I have a Excel which need to convert to xml. I use for each and invoke method to do this.
As the Excel file have thousands of items, I finally got a xml without line break so that the xml have a extremely long single line of code.
How can I add line break in the xml?

HI @Alondite04,

Refer this xaml file to Format the XML string to formatted xml string .
XMLFormat.xaml (8.7 KB)


Thank you @arivu96,I tried this but my file is too long (more than 5000 rows)so I failed with string. Is there another way ?

The xml file is written by xml writer in uipath by these steps:
read excel–new xml writer–invoke method(writeStartDocument)–
for each row :invoke(writeStartElement)-Invoke(writeElementString)–invoke(writeEndElement)–
invoke method(writeEndDocument)