Set Selection selects text within a field so it isn't what you want here.
What problems do you encounter with the above script? Freeze Window is often unecessary in today's systems, but if you see a bit of "layout flash" when you perform the script you'd write it as:
Go to Layout["ListAllFieldsSearch" (Search)]
Set Field[Search::OutTag; "X"]
Export Records (No dialog; "$exprt"; "FMPXMLRESULT"; Unicode (UTF-8)]
Go to Layout("Tabs" (Answer)]
But there are specific script steps that can trigger a window refresh even when Freeze Window has been executed.
I can certainly try the "Freeze Window" again when I go to the client site and debug what's happening. Is there like an "UnFreeze Window" or whether "Refresh Window" acts that way for when I'm done? The system I was using was slow enough to see flashes of what looked like a simple view as form layout for certain tables I was trying to import to from an external XML data file we receive generated from a web service application.
Freeze Window only freezes the window until one of several script steps (Such as Refresh Window) unfreeze it or the script ends. Once your script ends, the window will not be frozen.