Put recordSetStructure = root,*
Put row.endSeparator = 'nl' in place of row.fieldSeparator.
Refer below blog for simple conversions from XML to plain files: https://www.riyaz.net/sap/xipi-file-content-conversion-for-simple-structure/75/
Also, imo, chatgpt and others AI tools are still evolving and do not provide reliable solutions where SAP PI/CPI is concerned. So try to follow SAP documentations and blogs.