Post on 03-Jun-2018
8/12/2019 Extensible Markup Language By: Muhammad Haris
1/27
XML
(Extensible Markup Language)
8/12/2019 Extensible Markup Language By: Muhammad Haris
2/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
3/27
Introduction: What is XML
What is XML?
XML stands for E Xtensible Markup LanguageXML is a markup language much like HTMLXML was designed to carry data , not to display dataXML tags are not predefined. You must define your own tags XML is a W3C Recommendation
8/12/2019 Extensible Markup Language By: Muhammad Haris
4/27
Introduction: What is XML
What is XML?
XML stands for E Xtensible Markup LanguageXML is a markup language much like HTMLXML was designed to carry data , not to display dataXML tags are not predefined. You must define your own tags XML is a W3C Recommendation
StudentsHarisReminderDon't forget to check the notice-boards!
8/12/2019 Extensible Markup Language By: Muhammad Haris
5/27
Introduction: XML and HTML Relationship
HTML was designed to display data. XML was designed to transport and store data.
The Difference Between XML and HTML XML is not a replacement for HTML. XML was designed to transport and store data, with focus on what
data is. HTML was designed to display data, with focus on how data looks.
HTML is about displaying information,
while XML is about carrying information.
8/12/2019 Extensible Markup Language By: Muhammad Haris
6/27
Example
XML Does not DO Anything XML is Just Plain Text With XML You Invent Your Own Tags XML is Not a Replacement for HTML
StudentsHarisReminderDon't forget to check the notice-boards!
8/12/2019 Extensible Markup Language By: Muhammad Haris
7/27
Direct Benefits of XML
XML Separates Data from HTML XML Simplifies Data Sharing XML is Platform Independent
8/12/2019 Extensible Markup Language By: Muhammad Haris
8/27
Structure of and XML Document
8/12/2019 Extensible Markup Language By: Muhammad Haris
9/27
Another Example
8/12/2019 Extensible Markup Language By: Muhammad Haris
10/27
Elements and Attributes
An XML element is everything from (including) the element's start tag to(including) the element's end tag. An element can contain other elements,simple text or a mixture of both. Elements can also have attributes.
XML Attributes provide additional information about elements.
8/12/2019 Extensible Markup Language By: Muhammad Haris
11/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
12/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
13/27
DTD (Document Type Definition)
The oldest schema format for XML is theDocument Type Definition (DTD) It uses a custom non-XML syntax to describe
the schema. It has no support for newer features of XML,
most importantly namespaces .
http://en.wikipedia.org/wiki/Document_Type_Definitionhttp://en.wikipedia.org/wiki/Featurehttp://en.wikipedia.org/wiki/XML_Namespacehttp://en.wikipedia.org/wiki/XML_Namespacehttp://en.wikipedia.org/wiki/Featurehttp://en.wikipedia.org/wiki/Document_Type_Definition8/12/2019 Extensible Markup Language By: Muhammad Haris
14/27
Linking a DTD with an XML file
Inside an XML document Wrap it inside:
In an External file Add its reference in XML:
8/12/2019 Extensible Markup Language By: Muhammad Haris
15/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
16/27
XML Syntax Rules All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive: Opening and closing tags must bewritten with the same case:
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
XML Attribute values must be Quoted
8/12/2019 Extensible Markup Language By: Muhammad Haris
17/27
Well Formed and Valid
Well Formed XML with correct syntax
Valid Is already Well-Formed XML document that confirms to the rules of a
Document Type Definition or XML Schema
8/12/2019 Extensible Markup Language By: Muhammad Haris
18/27
XML NameSpace
8/12/2019 Extensible Markup Language By: Muhammad Haris
19/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
20/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
21/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
22/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
23/27
Why We are Studying
XML
8/12/2019 Extensible Markup Language By: Muhammad Haris
24/27
Client
WebMappingServer
DB
WMS Image (GIF,JPEG)
8/12/2019 Extensible Markup Language By: Muhammad Haris
25/27
8/12/2019 Extensible Markup Language By: Muhammad Haris
26/27
XML Real Life Examples
8/12/2019 Extensible Markup Language By: Muhammad Haris
27/27