xml
TRANSCRIPT
Presented By :-Kunal Roy
Subranjoy Debnath
XML TECHNOLOGY
Contents :- Introduction to XML How XML Works Infrastructure of XML Where XML is Used Advantages & Disadvantages of
XML
eXtensible Markup Language
File extension : .xml MIME type : application/xml ,
text/xml(deprecated)
Uniform Type : public.xmlIdentifier
Type of format : Markup Language
Extended form : SGML
What Is XML ?
eXtensible Markup Language (XML) Markup Language for documents
containing structured information Defined by four specifications:
XML , the eXtensible Markup Language XLL , the eXtensible Linking Language XSL , the eXtensible Style Language XUA , the XML User Agent
XML…
Based on Standard Generalized Markup Language (SGML) ISO-8879 .
Version 1.0 introduced by World Wide Web Consortium (W3C) in 1998 .
Bridge for data exchange on the Web . XML is cross platform , hardware &
software independent language . An XML document is attached
to a Document Type Definition
which describes its structure .
ComparisonsXML & HTML
XML HTML Extensible set of
tags Content oriented Standard Data
infrastructure Allows multiple
output forms
Fixed set of tags Presentation
oriented No data
validation capabilities
Single presentation
Processing Instruction :XML document usually begins with the
Processing Instruction(PI).Example of a PI statement -
<?xml version=“1.0” encoding=“UTF-8”?>
Tags :Tags are used to identifying data.Data is marked-up by using tags.Opening & Closing angular bracket(<>) are
enclose the name of the Tags. <NAME>Rajesh Mittal</NAME>
Elements :Basic units used to identify and describe data .Elements are represented by using tags .
XML document must have a root element . Content :
Example of a content – <BOOKNAME> The Painted
House</BOOKNAME>Information represented by the element is
referred as the content of that element .Contents are further divided into :-
Element Content Data ContentMixed Content
Attributes :Attributes provide additional information .Elements can have one or more attributes .Attribute consists of a name value pair .
Comments :It is a good programming practice .Example of comment entry –<!– PRODUCTDATA is the root element -->Comments are used to explain the code .
Document Type Definition (DTD) :DTD defines the structure of the content of an
XML document .It specifies the elements along with their
attributes that can be present in the XML document .
Types of DTD – Internal DTD External DTD
XML Schema : It is used to define the structure of XML document. It defines the list if elements & attributes . An XML Schema also specifies the order in which
the elements appear & also their data types .
Feature DTD Schema
Syntax Non – XML syntax XML syntax
Namespaces No Support Supports Namespaces
Inheritance No Support Supports Inheritance
Data Type Support Limited to String format
Wide range of data types including , string , real , etc.
Applicability Wide spread due to many years of practical application
Comparatively New
XML is used to exchange structured documents over internet .
XML can be used as a format to transfer structured data between heterogeneous systems as it is platform independent .
XML can be used effectively with applications like Java .
XML can be used to create new languages e.g. WML , VRML .
Advantages :- It is based on International Standards . It has User Specific Vocabulary , i.e. user
defined tags can be created .The Hierarchical Structure is suitable for
almost all types of documents . It is platform independent , thus relatively
immune to changes in technology .
XML provides the feature of conditional formatting of a document which HTML does not provide .
Forward & backward compatibility are easy to maintain despite the changes in DTD or Schema .
Disadvantages :-Repetition : In XML every element and
attribute name for every element and attribute instance has to be repeated .
External References : The biggest performance risk for XML comes from the fact that it can include external files .