I've written a query and will go through several records and create XML file for each record. I'd like to be able save the XML file in a directory. What is the best way to achieve this task?