Sie sind auf Seite 1von 15

XML

EXtensible Markup
Language
WHAT IS XML?
•XML stands for extensible markup
language.

•It is a language for documents


containing structured information.

•XML was designed to carry the data


not to display it.
•XML tags are NOT pre-defined.

•You can define your own tags like


<name> xyz </name>.

• Extension of XML file is .xml.


eg. filename.xml

• XML tags are case sensitive.


eg <CITY> <City> are unique.
XML FACTS
•Officially recommended by W3C
since 1998.

•A simplified form of SGML


(Standard Generalized Markup
Language).

•Primarily created by Jon Bosak of


Sun Microsystems.
• Bridge for data exchange on the
Web.

• Basic REQUIREMENTS for XML


are text-editor like notepad and web
browser(above internet explorer 5).

• XML tags and content are shown


in a browser as a tree.
XML TREE
<Contact>
            <Name>xyz</Name>
            <Email>my email</Email>
</Contact>

CONTACT
(root)

NAME EMAIL
(child) (child)
COMPONENTS OF XML

There are 3 components for XML content:


-the XML document
Contains root, child elements.

- DTD (Document Type Declaration)


Defines rules , entities , elements,etc.

-XSL (Extensible Style sheet Language)


Defines XML document transformation and
presentation.
COMPARISON BETWEEN HTML
AND XML

XML HTML
 Extensible set of tags  Fixed set of tags
 Content orientated  Presentation oriented
 It is case sensitive.  It is not case sensitive.
 It is mandatory to  It is not mandatory to
close all tags.
close all tags.
WHY XML?
• Richly structured documents.

• It removes two constraints which were


holding back Web developments:
1. dependence on a single, inflexible
document type (HTML)
2. the complexity of full SGML, whose
syntax allows many powerful but hard-
to-program options
• Plain Text
 Easy to edit
 Useful for storing data .

• Data Identification
 Tell you what kind of data you have
 Can be used in different ways by different
applications
XML EXAMPLE
<BOOKS>
< id>
<author>Hull</author>
<title>California</title>
<year> 1995 </year>
</id>
<article>
<author>Su</author>
<title> Purdue</title>
</article>
</BOOKS>
BOOKS

id article

author year
author title

title

Hull 1995 Su Purdue


California
Output:
CONCLUSION
•Exchange data.

•Store data

•Makes data more useful.

•Used to create new languages.


THANK
YOU

Das könnte Ihnen auch gefallen