ColdFusion - PowerPoint PPT Presentation

About This Presentation
Title:

ColdFusion

Description:

... 2nd Edition, by Rob Brooks-Bilson Utilizing XML and XSLT in ColdFusion MX, Nate Weiss On Using XML Well: Creating a dynamic XML menu, ... – PowerPoint PPT presentation

Number of Views:125
Avg rating:3.0/5.0
Slides: 17
Provided by: dcw6
Category:
Tags: coldfusion | xslt

less

Transcript and Presenter's Notes

Title: ColdFusion


1
ColdFusions XML Capabilities
  • Maryland CFUG
  • April 12, 2005

Presented by Doug Ward
2
Agenda
  • What is XML?
  • Creating XML
  • Parsing XML
  • Searching XML
  • Transforming XML
  • XML examples

3
Sources
  • Programming ColdFusion MX, 2nd Edition, by Rob
    Brooks-Bilson
  • Utilizing XML and XSLT in ColdFusion MX, Nate
    Weiss
  • On Using XML Well Creating a dynamic XML menu,
    by Ben Forta

4
A Definition of XML
What is XML?
  • XML is a tag-based markup language for
    describing data

5
How XML is similar to HTML
What is XML?
  • XML and HTML are both subsets of SGML (Standards
    Generalized Markup Language)
  • XML and HTML are both plain-text formats
    utilizing tags (called elements in XML) and
    attributes

6
How XML is different from HTML
What is XML?
  • XML demands strict adherence to correct syntax
  • XML doesnt have anything to do with how the data
    it describes is displayed
  • XML is extensible

7
Creating an XML Document
Creating XML
  • The XML declaration
  • XML comments
  • The root element
  • Nested child elements
  • Element attributes

8
Generating XML in ColdFusion
Creating XML
  • Generating XML using the ltCFXMLgt tag
  • Using the XmlFormat() tag to sanitize strings

9
The XML Document Object
Parsing XML
  • The XML document object is a ColdFusion MX
    datatype
  • The XML document object shares many similarities
    with ColdFusion structures and arrays
  • The XmlParse() function

10
Referencing an XML Document Object
Parsing XML
  • Basic view
  • DOM (Document Object Model) node view

11
Basic View
Parsing XML
  • Top-level document object and the root structure
  • Element structures
  • Using structure and array functions to access
    elements of the XML document object

12
DOM Node View
Parsing XML
  • In the DOM node view, XML documents are
    represented as a hierarchical tree of nodes
  • Each node in the tree consists of a node name, a
    node type, and a node value

13
Matching XML Data with XPath
Searching XML
  • XPath is a W3C recommendation outlining a
    language for addressing parts of an XML document
  • ColdFusion supports XPath as a query tool for
    extracting data from XML document objects via the
    XmlSearch() function

14
Transforming XML with XSLT
Transforming XML
  • XSLT (Extensible Stylesheet Language
    Transformation) works with XSL (Extensible
    Stylesheet Language) to perform the actual
    transformations
  • ColdFusion MX uses the XMLTransform() function to
    perform an XSLT transformation on an XML string
    or document object

15
XML Examples
  • Dynamic XML menus
  • WDDX data files

16
XML Resources
  • www.xml.com
  • www.oasis-open.org
  • XML and XSLT in ColdFusion MX
  • On using XML well
Write a Comment
User Comments (0)
About PowerShow.com