Transcript XML
XML
Prashant Karmarkar
Brendan Nolan
Alexander Roda
What is XML?
A framework for defining markup
languages
No fixed collection of markup tags
each XML language is targeted at its own
application domain
there is a common set of generic tools for
processing documents
HTML vs. XML?
HTML
fixed tag set and tag semantics
XML
defines no tag set or semantics
provides a facility to define tags and the structural
relationships between them
XML is not a replacement for HTML
HTML should ideally just be another XML language
XHTML is just that
Why is XML useful?
XML allows you to create your own markup language
XML data can be presented in a variety of ways
CSS and XSL
Separates data from presentation instructions which enables
changing the presentation without altering underlying data
XML is well suited as a means of transferring data
across platforms
Businesses store data in a different structure using different
software tools
EDI current solution – expensive and not practical except for
largest companies
XML provides a low cost, low barriers to entry solution for having
a universal data format that makes communication across
heterogeneous platforms possible
Example XML Applications
XHTML:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Hello world!</title></head>
<body><p>foobar</p></body>
</html>
CML:
<molecule id="METHANOL">
<atomArray>
<stringArray builtin="elementType">C O H H H H</stringArray>
<floatArray builtin="x3" units="pm">
-0.748 0.558 -1.293 -1.263 -0.699 0.716
</floatArray>
</atomArray>
</molecule>
The XML Schema
• More Rigid than HTML
• Uses validation
• Comprised of
• Elements
• Attributes
• Values
• TallTales.xml – Basic Example
• Basic Schema
• Organization of data
Processing Schemas
Example of CSS processing
Css stylesheets can control:
Font
Color of text
Positioning of content
Note the declaration.
TallTales.xml---->Through---->css file
Processing xml cont.
Css files not sufficient
XSL allows for
Reuse of document data
Calculate quantities and store values
Generate dynamic text
Takes an initial schema (tree) and creates
another tree. (“Results Tree”)
XSL Continued
XSL consist of three languages:
XSLT – Transforms vocabulary
XSL FO – Formats a schema
XPATH – An expression language
Used Vehicle example
Creating your own
Data modeling enables custom language
Two Approaches
DTD – DOCUMENT TYPE DEFINITION
XSD –XML SCHEMA DOCUMENTS
Insure validation
Web Services
Self Describing
Self-Contained
Modular Applications
Published
Located
Invoked
Over the web
What are Web Services, anyway?
TCP/IP - Universal Networking
Protocol
HTML – Universal User Interface
Java –Universal Coding Language
XML – Language for Universal
Data
Open, Cross Platform Standards
Where is the Web heading
More dynamic content
Bandwidth is getting cheaper
Storage is getting cheaper
Pervasive Computing is becoming
more important
Where do Web Services fit in?
Web Services can be used to combine the content from various
sources
Web Service can now deliver types of content
(streaming video or audio )
Web Service can deal with massive amounts of data intelligently
(Databases, LDAP directories, caches and load balancing factors)
Users need not require to run traditional browsers on some version of
Windows.Web Service can be used to serve all sorts of devices,
platforms and browser types
Enabling Technologies for
Web Services
XML
SOAP