XmlTransform

"-->
 XmlTransform (xmlString, xslString) 

Description

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) style sheet to it.

Example

In this example, we are joining two preexisting files. To test this function, you will need to have a preexisting XML file and an XSL file to use the transform function on.

 <cffile action="read"  file="d:\cfusionmx\wwwroot\xml\people.xml"  variable="myxml">  <cffile action="read" file="d:\cfusionmx\wwwroot\xml\people.xsl" variable="xslDoc">  <cfset xslAsString=ToString(xslDoc)>  <cfset mydocAsString=ToString(myxml)>  <cfset transformedXML = XmlTransform(mydocAsString, xslAsString)>  <cffile action="write" file="d:\cfusionmx\wwwroot\xml\resulhtm.html"  output="#transformedXML#">  <cfdump var = #transformedXML#>  


Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net