XML Introduction
XML Introduction
■ Documents Applications
– Marketing Selling
– Telling Interacting
■ Whole Part
– Content & Presentation Presentation
Web Technologies:
Presentation
■ HTML
– Mark-up language for formatting static content
■ DHTML
– API to formatted elements so they can be modified
dynamically
■ CSS
– Declarative format rules
Web Technologies: App
Logic
■ Scripting, Java, ActiveX
– Transport for application logic
■ ASP, CGI
– Server-based techniques for creating interactive
web sites by obtaining user responses and
dynamically generating HTML pages
What has been missing?
■ An intelligent data format that
– offers more than simple formatting
– is platform independent and portable
– isolates information from presentation
■ An Example
<!DOCTYPE contacts [
<!ELEMENT contacts(contact*)>
<!ELEMENT contact (name, email)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT email (#PCDATA)>
]>
XML: Key Characteristics
■ Data-Centric
■ Database/Source-Neutral
■ Open
■ Human-Readable
■ Extensible
■ Generic
XML Components
■ Document Type Definition (DTD)
– Defines data format
■ Document
– Instantiates a data format
■ Parser
– Converts a document into an internal
tree-structure
– Confirms that data conforms to DTD
XML Benefits
XML Benefits
Not Just for the Web
Conclusion
XML Benefits
Separates Content from
Formatting
– Data is self-describing
n et
XML r XML
te
In
XML Technical Overview
c o n ta c ts
c o n ta c t c o n ta c t
n am e e m a il n am e e m a il
J o e S m it h js m it h @ e m a il. c o m M a ry C a rn m c a rn @ y a h o o .c o m
XML Syntax: Terminology
Review
■ ELEMENT
– A conceptual name for a portion of a document
■ TAG
– The text that delineates an element.
– Normally a pair of START and END tags.
■ CONTENT
– The text contained between an element’s start and end
tags.
■ ATTRIBUTE
– A qualifier for an element
– Value may be
■ Value Set
■ Free Text
■ Empty
XML Syntax: Terminology
Review
<OPTION VALUE=“Option1” SELECTED>
First Option
</OPTION>