I am kind of confused on what you are asking exactly. What kind of data are you trying to format?
You could retrieve data from a source such as your database and output it as a SQL File or convert it to XML format using PHP’s built in SimpleXML. You would then to save the file and use the download helper to force the download.
Why not just pick a file and test the download helper on it?
More information can be found here on SimpleXML: