An Introduction to Enterprise Systems - Dr. Chao

Download Report

Transcript An Introduction to Enterprise Systems - Dr. Chao

XML Basics
Chao-Hsien Chu, Ph.D.
School of Information Sciences and Technology
The Pennsylvania State University
Information Age
Processing
Storage
Search
Management
Information
Retrieval
Sharing
Interchange
Representation
The Needs for Information Interchange










Power
Flexibility
Simplicity
Fault tolerance
Scalability
Interoperability
Open standard
Extensible
Character-based
Human-readable
IS
there
such a
creation ?
IS There Such a Creation?










Criteria
HTML SGML XML
Power
Flexibility
Simplicity
Fault tolerance
Scalability
Interoperability
Open standard
Extensible
Character-based
Human-readable
X
X
?
?
?
X
X
X
?
?
X
X
X
X
X
X
X
X
?
?
X
X
X
Weaknesses of HTML







HTML isn’t extensible – can’t define custom tags.
HTML is display-centric.
HTML isn’t usually directly reusable
HTML only provide one view of data.
HTML has little or no semantic structure.
Getting bigger and slower!
Not fault tolerance.
XML will complement, rather than replace, HTML
The Buzz Words Around XML





SVG – Scalable Vector Graphics Language
OFX – Open Financial Exchange
SGML – Standard Generalized Markup Language
DTD – Document Type Definition
DSSSL – Document Style Semantics and
Specification Language
 CSS – Cascading Style Sheet
 XSL – XML Stylesheet Language
 DOM – Document Object Model.
. . .
Basics of XML
What?
XML
Why?
What is XML?
 XML stands for Extensible Markup Language.
 Markup is the code, embedded with the
document, which store the information required
for electronic processing.
 XML is extensible because it predefines no tag but
lets the user create tags that are needed for
application.
 XML is a meta language because it can be used to
define markup languages.
Family of Markup Languages












GML – Generalized Markup Language
SGML – Standard Generalized Markup Language
HTML – Hyper Text Markup Language
XML – Extensible Markup Language
XHTML – Extensible Hyper-Text Markup Language
CML - Chemistry Markup Language
MathML – Mathematical Markup Language
SVG – Scalable Vector Graphic
SMIL – Synchronized Multimedia Integration Language
HDML – Handheld Device Markup Language
WML – Wireless Markup Language
OEB – Open eBook Structure Specification
Genealogy of Markup Languages
CERN
GML (1969)
IBM
SGML (1985)
ISO 8879
XML (1998)
W3C
HTML (1993)
XHTML
SVG
SMIL
HDML
OEB
Genealogy of Markup Languages
SGML
XML
XSL
HTML
Advantages of XML
 Common language for system-to-system
communication
 Enables loose connectivity, yet tight integration
 Relatively easy to implement conversion from an
RDB record to an XML message.
 Platform independent
 Scalable
 XML Signature provides message and party
authentication.
Traditional vs. Nontraditional Document
Format
Information
Structure
Format
Information
Traditional
Structure
Nontraditional
Ways of Displaying XML
Information
(Document)
XSL
DHTML + CSS
Format
DSSSL
Structure
(DTD)
CGI + Script
Write One Publish Many Idea
XML
Document
Process
Print out
Process
CD ROM
Process
Web
Process
WAP, etc.
XML for Information Interchange
Word
Processor
Spreadsheet
Package
XML
Statistical
Processing
CAD
Package
Demand for Platform Independent Technology
Platform
Presentation
Internet
XML
Data
XHTML
Java
Processing
Selected XML Applications
Middle-Tier Servers:
 Personalized Frequent-Flyer Website
 Building an Online Auction Website
 Anatomy of an Information Server
E-Commerce:
 Electronic Data Interchange (EDI)
 Collaboration in an e-commerce Supply Web
Selected XML Applications
Portals:
 Enterprise Information Portals (EIP)
Syndication:
 Information and Content Exchange (ICE)
Publishing:
 PC World Online
Content Management:
 Enterprise Data Management
Selected XML Applications
Content Acquisition:
 Integrating Legacy Data
Schema:
 Building a Schema for a Product Catalog
Stylesheet:
 A Stylesheet-Driven Tutorial Generator.
Navigation – Application Integration:
 Application Integration Using Topic Map
Components of XML Systems
XML
Document
(Contents)
Well-Formed
(Syntax)
XML
Parser
(Processor)
XML
DTD
(Rule)
Validate
(Structure)
XML
Application
Well Formed Document
Well formed XML documents are those documents that are
syntactically correct.
Here are some general guidelines:




At least one root element.
All elements must contain both start and end tags.
Tags are case sensitive
No overlapping tags. Elements must nest inside each other
properly.
 Attribute values must be enclosed in quotes.
 An empty element must end with “/>”
 The text characters (<), (>) and (“) must always be
represented by character entities.
How a Parser Interprets XML - Validate
XML
Document
(optional)
Data Type
Definition
Well
Formed?
no
Issue
Warning/Stop
Processing
yes
no
DTD?
yes
Valid?
Further
Processing
yes
no
Issue
Warning/Stop
Processing
Popular Parsers for XML
 MSXML – Microsoft’s IE
 Gecko – Netscape
 IBM XML Parser for Java
(http://alphaworks.ibm.com/tech/xml4j)
 Data Channel XJ Parser (http://xdev.datachannel.com)
 SUN XML Parser for Java
(http://developer.java.sun.com/developer/earlyAccess/xml/index.html)
Thank You?
Any Question?