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=any, xsl=string, parameters=struct );

Returns: String

Argument Description
any, required

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

Alias: xmlNode, xmlObj, xmlDoc, node

string, required

A string containing XSL text

Alias: xslString, xslText

Unimplemented Argument(s)

Argument Description
struct, optional

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.

Alias: params

* unimplemented *


styles = '
			<?xml version="1.0" encoding="UTF-8"?>
			<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
				<body style="font-family:Arial;font-size:12pt;background-color:##EEEEEE">
				<xsl:for-each select="notes/note">
					<div style="margin-bottom: 2.0em">
						<div style="background-color:teal;color:white;padding:4px">
							<div style="margin-bottom:1em;font-size: 1.2em; font-style: italic">
								<xsl:value-of select="heading"/>
							<div style="font-size: 0.8em">
								From: <xsl:value-of select="from"/>
							<div style="font-size: 0.8em">
								To: <xsl:value-of select="to"/>
						<div style="margin-top:1em;font-size: 0.9em">
							<xsl:value-of select="body"/>
		xml_stream = '
			<?xml version="1.0" encoding="UTF-8"?>
					<body>Here is the message you requested.</body>
					<heading>Your request</heading>
					<body>I got your message; all is well.</body>
		xml_document = XmlParse(xml_stream);

See also