Extensible Markup Language (XML)
Extensible Markup Language (XML)
Extensible Markup Language (XML)
1
Introduction
• What is XML?
¾A markup language for creating documents
containing structured information.
¾Markup language
Mechanism to identify structures in a document.
¾Structured information:
Contains content (text, image, etc.)
Contains indication of what role the content
plays (e.g., heading, footnote, address, etc.)
2
XML Development Goals
3
An Example XML Document
<?xml version=“1.0”?>
<quotation>
<isay> Hello, how are you </isay>
<yousay> I am not well </yousay>
<frown/>
</quotation>
4
XML: Prolog
XML: Elements
5
XML: Attributes
6
¾A special form of entity reference,
called a character reference, can be
used to insert arbitrary Unicode
characters in the document.
Decimal references: ℞
Hexadecimal references: ℞
== > Refers to the Rx prescription symbol.
XML: Comments
7
Processing Instructions
CDATA Sections
8
Document Type Declarations (DTD)
9
Attribute List Declaration
Entity Declarations
10
¾External entities:
They associate a name with the
contents of another file.
The contents of the (text) file is
inserted at the point of reference.
Example:
<!ENTITY IITLOGO
SYSTEM “/institute/logo.gif>
Notation Declarations
11
Linking Documents in XML
Simple Links
12
Extended Links
13
Including a DTD
<chapter>
……..
……..
</chapter>
14
Standard XML Languages
15
To Summarize
16
SOLUTIONS TO QUIZ
QUESTIONS ON
LECTURE 15
17
Quiz Solutions on Lecture 15
18
Quiz Solutions on Lecture 15
QUIZ QUESTIONS ON
LECTURE 16
19
Quiz Questions on Lecture 16
20