An XML Introduction Extensible Markup Language Describe Structure and Content of Data Sample XML Document
An XML Introduction
Extensible Markup Language
Describe Structure and Content of Data
Sample XML Document
What is this thing W3C?
World Wide Web Consortium
Established in October 1994 to lead the World Wide Web to its full potential by developing common protocols
The W3C is the group that coordinates the protocols and
standards used on the Web, such as HTML, and XML XHTML
What is XMLa framework for distributing data on the Web
an tool for exchanging data between different applications
a universal format for exchanging data between machines and operatingsystems
XML IS NOT A REPLACEMENT FOR HTML
XML as a universal format for data interchange
It is a compliment to Html Xml is used to transport data Eliminates proprietary data formats Lots of XML processing software
availableHTML – is used to format and display data.
Xml can make data available to all kinds of reading machines, hand held computers, voice machines and even news feeds
XHTML...latest version of HTML
WAP/WML – Wireless Application Protocol /Wireless markup language
RSS - Rich Site Summary, is an XML format fordistributing news headlines on the Web, also known as syndicationAlso known as “Really Simple Syndication” al
Language developed to control the presentation of web pages on mobile phones and PDA’s in the same way that HTML does for PCs
Many pages on the internet contain "bad" HTML.
XML is a markup language where everything must be marked up correctly, which results in "well-formed" documents.
XML is designed to describe data, and HTML is designed to display data
Today's market consists of different browser technologies, some run on computers, some on mobile phones or other small devices. The last-mentioned do not have the resources or power to interpret a "bad" markup language.
Combine the strengths of HTML and XML thus XML
HTML Document
<html><head><title>Hello There</title></head><body><h1>87654</h1><h2>76.33<h2></body></html>
What do those numbers represent?
<?xml version= "1.0" ?><products> (root element)
<items> (parent) <itemno>87654</itemno>
<cost>76.33</cost> </items>
<items> <itemno>99988</itemno>
<cost>90.50</cost> </items>
</products>
An XML Document
It Looks Like HTML ….
Sort of ….
Tags look just like HTML tags (although XML lets you ‘create’ your own)
It’s got .xml at the end
HTML Evolution
Started with very few tags …Language evolved, as more tags
were added forms tables fonts frames
HTML Problems
Desire for personalized tags
Want to put data into HTML form mathematics, database entries, literary
text, poems, purchase orders ….
HTML just isn’t designed for that!
Software Problems
The Text Encoding Initiative (TEI)
An international standard for libraries, museums, publishers, to represent all kinds of literary texts for online research and teaching,using a unique encoding scheme. A system for digitally describing texts in the humanities,using a computer mark-up language called XML
Idea (2): “Webified” SGML
New eXtensible Markup Language: XML
Can use XML to define new languages
Distributes easily on the WebCan mix different types of data
together can easily add new tags, and tell a
browser what to do with them.
We can Define and Create our ownLaguages to Describe our Data
Basic XML Rules
Tags like in HTML, but ...
Technical details Tag names are case-sensitive Always need end tags Always quote attribute values
Like this example …..
<?xml version= "1.0" ?><products> <items>
<itemno>87654</itemno> <cost>76.33</cost>
</items></products>