Professional Documents
Culture Documents
XML Technology
What is XML
XML- eXtensible Markup Language
XML- was designed to store and transport data.
XML- was designed to be both human- and machine-
readable.
XML- plays an important role in many different IT systems.
XML- is often used for distributing data over the Internet.
More flexible and adaptable than HTML
XHTML -- a reformulation of HTML 4 in XML 1.0
What is XML
XML was designed to carry data, not displaying data
XML is not a replacement for HTML.
Different goals:
XML was designed to describe data and to focus on what data is.
HTML was designed to display data and to focus on how data
looks.
HTML is about displaying information, XML is about
describing information.
XML is used in many aspects of web development.
XML is often used to separate data from presentation.
XML does not carry any information about how to be
displayed.
Note
Example 1: XML To: Tove
<note>
<date>2015-09-01</date> From: Jani
<hour>08:30</hour> Note
<to>Tove</to> Reminder To: Tove
<from>Jani</from>
Don't forget me this
<body>Don't forget me this weekend!</body>
weekend! From: Jani
</note>
<message>
<text>Hello, world!</text>
</message>
Is XML a Programming Language?
A programming language consists of grammar rules and its
own vocabulary which is used to create computer
programs. These programs instruct the computer to
perform specific tasks.
<element>
Syntax Rules for Tags and Elements
• Element Syntax − Each XML-element needs to be
closed either with start or with end elements as
shown below −
• <element>....</element>
<x>...</x> <root>
<y>...</y> <x>...</x>
<y>...</y>
</root>
Case Sensitivity
The names of XML-elements are case-sensitive. That
means the name of the start and the end elements
need to be exactly in the same case.
For example
<contact-info> is different from <Contact-Info>
XML Attributes
An attribute specifies a single
property for the element,
using a name/value pair.
<a b = "x">....</a>
XML References
References usually allow you
to add or include additional
text or markup in an XML
document. References always
begin with the symbol "&"
which is a reserved character
and end with the symbol ";".
Two types of references XML−
Entity References −
An entity reference contains a name between the start and
the end delimiters.