Don't use temporary files

Instead, store XML data in memory.