Query/Table SavetoXML with large datasets

Query/Table SavetoXML with large datasets

First, let me say this forum looks awful.

Anyway, I am using uniTable.SavetoXML(name of file) and it is generally working fine - on small tables. With large tables I get an 'Out of memory' error.

the system seems to be loading the whole table into memory and then exporting to XML?  This certainly won't work with large tables (20 million records, etc).

Is there some way around this?   This is using Firebird 3 but I suppose the DB does not really matter.