There are two versions of the XML control.
Microsoft.DOMDocument.5.0
progID.Microsoft.FreeThreadedDOMDocument.5.0
progID.
Note In MSXML, "free-threaded" means ThreadingModel='Both'
, and cross-thread marshalling is supported.
If you plan for several threads to access your XML data from a single control, be sure to use the free-threaded control. If only one thread will access the XML data, use the rental model control for better performance.
The following is a sample global.asa file that creates session-level and application-level free-threaded versions of the XML control.
<SCRIPT LANGUAGE=VBScript RUNAT=Server> Sub Session_OnStart ON error RESUME next SET Application("AppFXMLdoc") = _ server.CreateObject("Msxml2.FreeThreadedDOMDocument.5.0") SET Session("SessFXMLdoc") = _ server.CreateObject("Msxml2.FreeThreadedDOMDocument.5.0") End Sub Sub Session_OnEnd ON error RESUME next SET Session("SessFXMLdoc") = nothing SET Application("AppFXMLdoc") = nothing Session("SessFXMLdoc") = empty Application("AppFXMLdoc") = empty End Sub </SCRIPT>
Scripts accessing the Session
and Application
objects will be able to simultaneously access the AppFXMLdoc
and SessFXMLdoc
objects.