XML and XSL in ColdFusion MX
Short Description
Macromedia ColdFusion MX brings a whole new set of features and advantages …… Functions in ColdFusion MX,” on the Macromedia ColdFusion MX Application …
Website: www.adobe.com | Filesize: 527kb
Content
Utilizing XML and XSLT in ColdFusion MX
By Nate Weiss
April 2002
Installing the sample code…………………………………………………………………….2
Parsing existing XML……………………………………………………………………………3
Parsing your first XML document…………………………………………………………4
Introducing XML Document and Element structures………………………………5
Fetching XML documents with the cfhttp tag…………………………………………8
Looping through child elements…………………………………………………………..9
Referring to elements in the tree by name……………………………………………11
A note about dots and brackets…………………………………………………………12
Querying XML with the XMLSearch() function and XPath……………………….14
A crash course in XPath…………………………………………………………………..15
An easy XPath example……………………………………………………………………16
Generating new XML documents………………………………………………………….17
Using the CFXML tag to output XML………………………………………………….18
Producing dynamic XML…………………………………………………………………..19
Escaping special characters………………………………………………………………21
Outputting XML directly…………………………………………………………………..22
Using functions instead of the cfxml tag to create XML………………………….22
Transforming XML through XSLT…………………………………………………………26
Overview of XSLT…………………………………………………………………………….26
Transforming XML with the XmlTransform() tag……………………………………28
Experimenting with the cffunction tag…………………………………………………..30
Creating dynamic stylesheets……………………………………………………………….31
Other XML-related features in ColdFusion MX………………………………………..32
1Macromedia ColdFusion MX brings a whole new set of features and advantages to web development-silky-smooth Flash integration, way-cool support for web services and other groovy stuff that will surely make the lives of ColdFusion developers easier and more interesting. One of the neatest new features in ColdFusion MX, and one which forms the basis for many of its other new features, is its native support for XML.
This new functionality makes the task of working with XML-something that can be quite complicated or cumbersome in other languages-remarkably simple and straightforward. Suddenly a whole bunch of XML-related tasks just became ridiculously easy.
ColdFusion MX supports XML in three basic areas:
?Parsing existing XML
?Generating new XML
?Transforming XML through XSLT
Note: This article assumes that you have at least some familiarity with XML. At its simplest, XML can be defined as syntax for marking up data with “tags,” similar to the HTML and CFML tags that you know and love. These tags (called elements in XML) can have all kinds of different names, depending on what they describe (perhaps
Get the file Download here
Related Books:Related Searches: macromedia coldfusion mx, nate weiss, element structures, xml 3, xml and xsl
Comments
Leave a Reply