XML Basics
XML Basics
What is XML?
XML is a Meta Markup Language
XML describes structure and semantics, not formatting
A Song Description in HTML
A Song Description in XML
Editing and Saving XML Files
The XML Declaration
The TITLE element
The SONG element
Style Sheets provide formatting
Attaching style sheets to documents
Style Sheet Languages
What is XML used for?
Domain-Specific Markup Languages
Self-Describing Data
An XML Fragment
Interchange of Data Among Applications
XML Applications
Example XML Applications
Mathematical Markup Language
Channel Definition Format
Classic Literature
Vector Graphics
The Resource Description Framework (RDF)
An Example of RDF
XML for XML
XSL: The Extensible Stylesheet Language
XLinks: The Extensible Linking Language
File Formats, in-house applications, and other behind the scenes uses
A larger example: Music Catalog
Sample Catalog
Organizing the Data
What is the Root Element
The Root Element
What are the Immediate Children of the Root?
Child Elements
White space in XML is not especially significant
Composers
Grand Children
Attributes
Attributes vs. Elements
When not to use attributes
Compositions
Composition Example in HTML
Each composition has a
Composition Example in XML
Further Divisions
Attaching the Composer to the Composition
Some Keywords For the Search Engines
Standard Signature
Cascading Style Sheets
A Blank Style Sheet
The Default Rule
A style rule for the category element
A style rule for the composer element
A style rule for the title element
A style rule for the catalog info
Style rules for the signature
Style Rules for composition children
Finished Style Sheet
Possible Extensions
Possible Solutions
CSS or XSL?
Well-formedness Rules
Open and close all tags
Empty tags end with />
There is a unique root element
Elements may not overlap
Attribute values are quoted
< and & are only used to start tags and entities
Only the five predefined entity references are used
Programming with XML
SAX, the Simple API for XML
The Document Object Model (DOM)
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2000
Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 4, 2000