TransformXML Method [Access 2003 VBA Language Reference]

Applies an Extensible Stylesheet Language (XSL) stylesheet to an XML data file and writes the resulting XML to an XML data file.

expression.TransformXML(DataSource, TransformSource, OutputTarget, WellFormedXMLOutput, ScriptOption)

expression Required. An expression that returns an Application object.

DataSource   Required String. The name and path of the XML file to import.

TransformSource   Required String. The name and path to the XSL file to apply to the XML data file.

OutputTarget   Required String. The file name and path for the resulting XML data file after applying the XSL file.

WellFormedXMLOutput   Optional 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   Optional AcTransformXMLScriptOption. Specifies the action taken if the XSL file contains scripting code.

AcTransformXMLScriptOption can be one of the following AcTransformXMLScriptOption constants
acDisableScript The script is disabled.
acEnableScript The script is enabled.
acPromptScriptdefault The user is prompted to disable or enable the script.

Remarks

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.

Applies to | Application Object

See Also | ExportXML Method | ImportXML Method