Here is an example that writes an XML export to a file opened by USFile:
INVOKE USFile.Open WITH SELECT 'Tours', '%TEMP%\tours.xml', 'WRITE'; INVOKE XML.Export WITH SELECT 'USFile.Tours' WriteOutputTo, * FROM tours; INVOKE USFile.Close WITH SELECT 'Tours';
See also
Example: Simple XML export
Example: XML export with DTD name and IO formats
Example: XML export for update
XML.Export