in reply to Need to convert the XML into file

For some ideas (read examples) see LibXml - Convert XML to CSV from API Feed