Application.TransformXML (Access)
Applies an Extensible Stylesheet Language (XSL) stylesheet to an XML data file and writes the resulting XML to an XML data file.
Setting the WellFormedXMLOutput argument to True will result in a run-time error if the XSL file that you apply does not result in well-formed XML.
TransformXML (DataSource, TransformSource, OutputTarget, WellFormedXMLOutput, ScriptOption)
Dim strDataSource As String: strDataSource =
Dim strTransformSource As String: strTransformSource =
Dim strOutputTarget As String: strOutputTarget =
TransformXML DataSource:=strDataSource, TransformSource:=strTransformSource, OutputTarget:=strOutputTarget
Arguments
The following arguments are required:
DataSource (String) - The name and path of the XML file to import.
TransformSource (String) - The name and path to the XSL file to apply to the XML data file.
OutputTarget (String) - The file name and path for the resulting XML data file after applying the XSL file.
Optional arguments
The following arguments are optional
WellFormedXMLOutput (Boolean) - Setting this argument to True will create a well-formed XML file. Setting this argument to False will encode the resulting XML file in UTF-16 format. The default value is False.
ScriptOption (AcTransformXMLScriptOption) - An AcTransformXMLScriptOption constant that specifies the action taken if the XSL file contains scripting code. The default value is acPromptScript.
Possible return values are acDisableScript - The script is disabled, acEnableScript - The script is enabled, acPromptScript - The user is prompted to disable or enable the script.