XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania...
-
Upload
tracey-hubbard -
Category
Documents
-
view
223 -
download
1
Transcript of XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania...
![Page 1: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/1.jpg)
XML BasicsXML BasicsChao-Hsien Chu, Ph.D.
School of Information Sciences and TechnologyThe Pennsylvania State University
Extensible
Meta Language
Markup
Language
![Page 2: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/2.jpg)
Information
Information AgeInformation Age
Processing
Representation
Storage
Retrieval
Search Sharing
Management
Interchange
![Page 3: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/3.jpg)
IS there
such a creation ?
The Needs for Information InterchangeThe Needs for Information Interchange
Power Flexibility Simplicity Fault tolerance Scalability Interoperability Open standard Extensible Character-based Human-readable
![Page 4: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/4.jpg)
IS There Such a Creation?
Power Flexibility Simplicity Fault tolerance Scalability Interoperability Open standard Extensible Character-based Human-readable
HTML SGML XML
X XX X
? XX XX X
? ? ?? ? ?
X XX X X
X X
Criteria
![Page 5: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/5.jpg)
Weaknesses of HTMLWeaknesses 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
![Page 6: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/6.jpg)
The Buzz Words Around XMLThe 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.
. . .
![Page 7: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/7.jpg)
Basics of XMLBasics of XML
XMLXML
What?
Why?
Who
?
Where?
When?
How
?
![Page 8: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/8.jpg)
What is XML?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.
![Page 9: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/9.jpg)
Family of Markup LanguagesFamily 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
![Page 10: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/10.jpg)
Genealogy of Markup LanguagesGenealogy of Markup Languages
GML (1969)
SGML (1985)
XML (1998)
HTML (1993)
XHTML SVG SMIL HDML OEB
IBM
ISO 8879
W3C
CERN
![Page 11: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/11.jpg)
SGML
XML
Genealogy of Markup LanguagesGenealogy of Markup Languages
HTMLXSL
![Page 12: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/12.jpg)
Advantages of XMLAdvantages 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.
![Page 13: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/13.jpg)
Traditional vs. Nontraditional DocumentTraditional vs. Nontraditional Document
Information
Structure
Format
Traditional
Format
Information Structure
Nontraditional
![Page 14: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/14.jpg)
Ways of Displaying XMLWays of Displaying XML
Format
Information(Document)
Structure(DTD)
XSL
DHTML + CSS
DSSSL
CGI + Script
![Page 15: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/15.jpg)
Write One Publish Many IdeaWrite One Publish Many Idea
XMLDocument
Print out
CD ROM
Web
WAP, etc.
Process
Process
Process
Process
![Page 16: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/16.jpg)
XML for Information InterchangeXML for Information Interchange
CADPackage
WordProcessor
StatisticalProcessing
SpreadsheetPackage
XML
![Page 17: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/17.jpg)
Demand for Platform Independent TechnologyDemand for Platform Independent Technology
Internet XHTML
XML Java
Platform
Data Processing
Presentation
![Page 18: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/18.jpg)
Selected XML ApplicationsSelected 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
![Page 19: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/19.jpg)
Selected XML ApplicationsSelected XML Applications
Portals: Enterprise Information Portals (EIP)
Syndication: Information and Content Exchange (ICE)
Publishing: PC World Online
Content Management: Enterprise Data Management
![Page 20: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/20.jpg)
Selected XML ApplicationsSelected 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
![Page 21: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/21.jpg)
Components of XML SystemsComponents of XML Systems
XMLParser
(Processor)
XMLApplication
XMLDocument(Contents)
XMLDTD
(Rule)
Well-Formed(Syntax)
Validate(Structure)
![Page 22: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/22.jpg)
Well Formed DocumentWell Formed Document
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.
Well formed XML documents are those documents that are syntactically correct.
![Page 23: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/23.jpg)
(optional)
How a Parser Interprets XML - ValidateHow a Parser Interprets XML - Validate
XMLDocument
Data TypeDefinition
IssueWarning/Stop
Processing
FurtherProcessing
WellFormed? DTD?
Valid?Issue
Warning/StopProcessing
no
no
no
yes
yes
yes
![Page 24: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/24.jpg)
Popular Parsers for XMLPopular 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)
![Page 25: XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.](https://reader030.fdocuments.net/reader030/viewer/2022032611/56649e835503460f94b84be1/html5/thumbnails/25.jpg)
Thank You?
Any Question?