xmlTransform

Applies an Extensible Stylesheet Language Transformation (XSLT)
to an XML document object that is represented as a string
variable. An XSLT converts an XML document to another format
or representation by applying an Extensible Stylesheet
Language (XSL) stylesheet to it.

xmlTransform(xml, xsl [, parameters]) → returns string

Argument Reference

xml xml
Required

An XML document in string format, or an XML document object.

xsl string
Required

XSLT transformation to apply; can be any of the following:
- A string containing XSL text.
- The name of an XSTLT file. Relative paths start at
the directory containing the current CFML page.
- The URL of an XSLT file; valid protocol identifiers
include http, https, ftp, and file. Relative paths start
at the directory containing the current CFML page.

parameters struct

A structure containing XSL template parameter name-value
pairs to use in transforming the document. The XSL transform
defined in the xslString parameter uses these parameter values
in processing the xml.

Examples
Sample code invoking the xmlTransform function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub