The code is dead simple
The prototype:
(Queue p:Q, <String p:Filename>, <String p:Format>) ,String ,Proc
Data section:
LocalXML xFileXML
Code in question:
!------------------------------------------------------------------
IF ~Records(p:Q)
RetVal = 'Queue is empty. No export file produced.'
DO ReturnRoutine
END
N_ExportQFile = choose(~p:Filename, 'ExportQ.xml', p:Filename)
IF ~p:FileName ! prompt for a filename if not already provided
if ~FileDialog('Export Queue to file ...', N_ExportQFile, 'XML files (*.xml)|*.xml', 10011b)
RetVal = 'File Selection Cancelled'
DO ReturnRoutine
end
END
LocalXML.start()
LocalXML.Save(p:Q, N_ExportQFile)
RetVal = 'Completed'
DO ReturnRoutine
The output is attached as a txt.
Thanks, Bruce.