XML Its Role and Use - PowerPoint PPT Presentation

About This Presentation
Title:

XML Its Role and Use

Description:

Organization A works with a supplier (organization B) ... METHOD='BabelFish' TRANSLATIONMODE='en_fr' SOURCEDATA='Hello, my name is Ben' ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 32
Provided by: cfc5
Category:
Tags: xml | babelfish | role | use

less

Transcript and Presenter's Notes

Title: XML Its Role and Use


1
XML Its Role and Use
  • Ben Forta
  • Senior Product Evangelist, Macromedia

2
Agenda
  • The Problem
  • Introducing XML
  • Working with XML
  • ColdFusion MX and XML
  • Web Services

3
The Problem
4
An Example
  • Organization A works with a supplier
    (organization B)
  • Organization A does not have access to
    organization B's IT systems

5
The Problem
  • All interaction between the two organizations is
    manual
  • Order submission
  • Status checking
  • Payment
  • Reporting

6
The Need
  • The two organizations need to share information,
    despite differing environments and incompatible
    applications

7
Introducing XML
8
What XML Is Not
  • XML is not a way to format page layout (as is
    HTML)
  • XML is not a presentation language

9
What Is XML
  • XML is less a language per se, and more a way
    to describe data
  • XML data is described using vocabularies

10
Understanding XML
  • XML serves two primary purposes
  • Provides a framework to separate data from
    presentation and layout
  • Provides a syntax that allows applications to
    share data
  • XML defines common information formats across
    nearly every major computing endeavor

11
Example - The Challenge
  • An organization relies on multiple suppliers,
    each of whom uses a different computer system and
    thus a different way to describe parts
  • The challenge is to retrieve real time status
    information from multiple sources so as to be
    able to present it in a consistent format

12
Example - The Solution
  • An XML format (a vocabulary) is agreed upon
    ahead of time, by the suppliers
  • Each supplier publishes data in the agreed upon
    format
  • The client retrieves the standardized data as
    needed

13
Example - Sample Data
  • Sample XML vocabulary
    123 A24680DER_NUM Shipped
    20020101
    UPS ...

14
Working With XML
15
XML Terminology
  • DTD data definition document describing the XML
    data (sometimes called a schema)
  • DOM document object model, a hierarchical view
    of XML content
  • Node an item in the DOM, nodes are made up of a
    type, a name, and a value
  • Root top level element in a document
  • Element the actual content

16
Displaying XML Data
  • XML is NOT a page layout language
  • XML describes data
  • XML data can be displayed in any client
    technology, including HTML, Flash, Java,
    JavaScript, ActiveX

17
Working with XML
  • Working with XML requires tools that can
    manipulate structured XML data
  • Read values
  • Walk trees
  • Search for and extract specific elements
  • Set values and build trees

18
Applying Transformations
  • XSL is a template language that is used to
    provide display rules for XML data
  • XML is data, XSL is a set if display rules
  • XSL is applied to XML generating a transformation
    (the actual output)

19
ColdFusion MX and XML
20
ColdFusion MX and XML
  • ColdFusion provides build in support for
  • Reading XML data
  • Writing XML content
  • Applying XSL transformation
  • Performing XPath searches

21
XML In ColdFusion
  • Within ColdFusion, XML documents are accessed as
    objects
  • An XML object in ColdFusion is a structure, and
    can be access as such
  • Objects are created using
  • XMLNew()
  • XMLParse()

22
Reading XML Data
  • XMLParse() converts an xml document into an XML
    object
  • VARIABLE"xmldata" a) root.order_status.statusTPUT

23
Writing XML Content
  • or XMLNew() creates XML objects that may
    be populated as needed
    QUERY"orders"
    ordnum
    status

24
Applying XSL Transformations
  • XSL transformation are applied using
    XMLTransform()
  • XMLTransform(xmlfeed,
    xsldoc)

25
Performing XPath Searches
  • XPath is a search language used to find and
    extract values from an XML document
  • XPath uses search patterns to specify search
    criteria

26
Web Services
27
Why Web Services?
  • XML is data and facilitates data sharing
  • Web Services are distributed applications built
    on top of XML (and SOAP)
  • Where XML formats data for sharing, SOAP
    facilitates that sharing

28
Access to Web Services
  • provides access to any Web
    Servicess.net/sd/2001/BabelFishService.wsdl"METHOD"Babel
    Fish"TRANSLATIONMODE"en_fr"SOURCEDATA"Hello,
    my name is Ben"RETURNVARIABLE"name_french"OUTPUTname_french

29
Publishing Web Services
  • Any ColdFusion components can be made accessible
    as a Web service by simply defining the ACCESS in
    the component methodACCESS"remote"
  • ColdFusion Components and methods may be secured
    using
  • User roles
  • Access levels

30
Summary
  • XML is data sharing
  • ColdFusion MX makes XML usable
  • Web Services facilitate distributed XML data
    sharing

31
QA
Write a Comment
User Comments (0)
About PowerShow.com