• Thanks, I think it was a volume of data issue, I tried with a different query limiting the results set, once I hit about 115,000 rows of data the XML would fail to create, below that and I was safe. From some brief reading I suspect the server it's running on isn't beefy enough as the entire XML file needs to be held in memory before it can be created I believe.

    Cheers for the prompt 🙂