Vous êtes sur la page 1sur 12

XML - Session 1

Rajesh Math

SICSR XML - Lecture 1

10/17/2012

Overview
An XML example so whats so special about XML? The birth of the Web -- HTML HTML is not enough -- why? XML for universal data

Common uses and applications

SICSR XML - Lecture 1

10/17/2012

XML test.xml
<?xml version="1.0" encoding="iso-8859-1"?> <html xmlns="http://www.w3.org/TR/xhtml1" > <head> <title> Title of text XHTML Document </title> </head> <body> <div class="myDiv"> <h1> Heading of Page </h1> <p> here is a paragraph of text. I will include inside this paragraph a bunch of wonky text so that it looks fancy. </p> <p>Here is another paragraph with <em>inline emphasized</em> text, and <b> absolutely no</b> sense of humor. </p> <p>And here is another paragraph, this one containing an <img src="image.gif" alt="waste of time" /> inline image, and a <br /> line break. </p> </div> 10/17/2012 SICSR XML - Lecture 1 </body></html>

HTML
The HyperText Markup Language
A simple language for distributing text

Started with very few tags Language evolved, as more tags were added
forms tables fonts frames

SICSR XML - Lecture 1

10/17/2012

HTML Problems
Desire for personalized tags

Want to put data into HTML form


mathematics, database entries, literary text, poems,

purchase orders .
HTML just isnt designed for that!

SICSR XML - Lecture 1

10/17/2012

HTML Problems
Software processing Server management of data But -- HTML is so illHTML HTML HTML

formed, this is hard!

HTML HTML

10/17/2012

SICSR XML - Lecture 1

SGML
HTML was defined using SGML
Standard Generalized Markup Language A meta-language for defining languages.

Complex, sophisticated, powerful

SICSR XML - Lecture 1

10/17/2012

XML
New eXtensible Markup Language: XML Can use XML to define new languages Distributes easily on the Web Can mix different types of data together

SICSR XML - Lecture 1

10/17/2012

Basic XML Rules


Tags like in HTML, but ... Technical details
Always need end tags Special empty-element tags Always quote attribute values

SICSR XML - Lecture 1

10/17/2012

XML:Data Abstraction
XML as a universal format for data interchange
Machines exchange data as XML-format messages Eliminates proprietary data formats Lots of XML processing software available

SICSR XML - Lecture 1

10/17/2012

XML Messaging
Database Request/send data
Other DB

Other DB

Other DB Request/send data


10/17/2012 SICSR XML - Lecture 1

XML (Contd)
a framework for distributing data on the Web

an integration tool for mixing different types of

data a universal format for exchanging data between machines XML Parsers process XML Documents

SICSR XML - Lecture 1

10/17/2012

Vous aimerez peut-être aussi