You are on page 1of 26

e tensible

Markup Language (XML)

By:SHUBHAM BHATTACHARYA WASIM RJA SAHAB MIA PAWAN

Outline of Presentation

Introduction Comparison between XML and HTML Component of an xml document XML queries Schema Summary

What is XML?

eXtensible Markup Language 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) Version 1.0 introduced by World Wide Web Consortium (W3C) in 1998 Bridge for data exchange on the Web

I believe both Microsoft and the industry should really bet their future around XML, the standards around XML are key to where we need to go. (Mr. Bill Gates)

Comparisons

XML

HTML

Extensible set of tags Content orientated Standard Data infrastructure Allows multiple output forms

Fixed set of tags Presentation oriented No data validation capabilities Single presentation

COMPONENTES OF AN XML Documents


THERE ARE SEVEN COMPONENTS OF AN XML DOCUMENTS THAT CAN BE USE FOR REPRESENTING DATA IN A HIERARCHICAL ORDER:

Processing instruction(pi) Tags Elements Content Attributes Entities Comments

PROCCESSING INTRACTION(PI)
An xml document usually beings with the xml declaration statement called the processing instruction(pi).The pi statement provides information on how the elm file should be processed. The pi statement can be return as: <?Xml version=1.0 encoding =utf-8?>

TAGS

Tags are used to specify a name for a given piece of information. It is a means of identifying data. Data is marked up using tags. A tag consists of opening and closing angular brackets(<>) that enclose the name of the tag. Tag usually occur in pairs. Each pair consists of a start tags and end tags. For example: <P>Nick Shaw</p>

ELEMENTS

Elements are the basic units use to identify and describe data in xml. They are the building blocks of an xml document. Elements are represented using tags. Consider the following example: <Author name>Jhon smith</author name>

CONTENT

CONTENTS refers to the information represented by the elements of an xml document. Consider the following example:

<book name> the painted house</book name>

ATTRIBUTES

ATTRIBUTES provides additional information about the elements for which they are declared . an attribute consist of a namevalue pair. Consider the following example:
<Product name proid=001>Barbie doll</product name>

ENTITIES
ENTITY is a name that is associated with a block data, such as a chunk of text or a reference to an external file that contains textual or binary information.

SOME OF THE PREDEFINE INTERNAL ENTITIES THAT FORM A PART OF XML SPECIFICATION ARE LISTED FOLLOWS:

INTERNAL ENTIES
& lt; & gt & amp

DESCRIPTION
Used to display the less than (<) symbol. Used to display the greater than (>) symbol. Used to display the ampersand(&) symbol.

COMMENTS

COMMENTS are the statements used to explains the xml code. They are used to provide documentation information about the xml file or the application to which the file belongs. The parser ignores comment entries code execution. The following example illustrates the used of a component in an xml documents: <!--product data is the root element-->

XML Query Languages

The first XML query languages

LOREL (Stanford) Xql

Several other query languages have been developed (e.G. UNQL, xpath) XML-QL considered by W3C for standardization Currently W3C is considering and working on a new query language: xquery

A Query Language for XML: XML-QL

Developed at AT&T labs To extract data from the input XML data Has variables to which data is bound and templates which show how the output XML data is to be constructed Uses the XML syntax Based on a where/construct syntax Where combines from and where parts of SQL Construct corresponds to sqls select

XML-QL Query

Retrieve all authors of books published by Morgan Kaufmann:


where <book> <publisher><name> Morgan Kaufmann </name> </publisher> <title> $T </title> <author> $A </author> </book> in www.a.b.c/bib.xml construct <result> $A </result>

SCHEMA
An

xml schema defines the list of elements and attributes that can be used in an xml documents. In addition to the list of the elements, an xml schema specific the order in which this elements appear in the xml documents, and their data types

DATA TYPE IN XML SCHEMAS


Data types can classified as follows:
PRIMITIVE DERIVED ATOMIC LIST

UNION

ELEMENTS IN XML SCHEMA


THERE ARE TWO TYPE OF ELEMENTS WHICH ARE:

SIMPLE COMPLEX

SIMPLE ELEMENT
A simple type element does not contain any child elements or attributes. It contains values, such as no. , Strings and dates Declaring elements with simple data type: <Xsd:simpletype name=phone no.> <Xsd:restriction base=xsd:stiring> <Xsd:lenth value=8/> <xsd:pattern value=\d{3}-\d{4}/> </xsd:restriction> </Xsd:simple type>

COMPLEX ELEMENT
A complex type element contains other elements,attributes,and mixed content. You can define a complex data type using the following syntax: <Xsd:complextype name = data type name> Content model declaration </Xsd:complex type>

Internal Adoption
The

short list

Public Web Services MSDN Content Management Microsoft.com Content Management MSN - Syndication MS Knowledge Base (300,000 + articles) uddi.microsoft.com UDDI repository
bCentral

External Adoption

American Express Co. Commerce One Inc Compaq Computer Corp. Dell Computer Corp. Descartes Fujitsu Ltd. Great Plains Just Enough.com

Loudcloud Inc. Lycos.com match21 Merrill Lynch & Co. Inc. Monster.com NEON Nortel Networks Corp. NTT Communications Corp. RealNames Corp. Sabre Holdings Corp. SAP AG

Conclusion XML and Microsoft


Microsoft
the

is committed to:

developer building and delivering web service enabling platforms and developer tools standards leadership providing a strong development community for support and guidance .NET Framework and XML adoption across our product offering

FAQ

You might also like