Xml Overview
-
Upload
mohammad-elgarrai -
Category
Education
-
view
181 -
download
1
description
Transcript of Xml Overview
![Page 1: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/1.jpg)
XML OVERVIEW
Mohammad Elsheikh Salim Elsheikh ElgarraiLecturer - Shendi University (Sudan)
![Page 2: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/2.jpg)
Topics in covered in this presentation
What is XML? History. Why XML?
The Data Problem. Weaknesses of HTML.
Key Features of XML. Extensibility Media and Presentation independence
Separation of contents from presentation Structure Validation
![Page 3: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/3.jpg)
What is XML? Definition: The Extensible Markup Language (XML) is
a subset of SGML (Standard Generalized Markup Language). Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.
Versions: XML 1.0, XML 1.1, XML 2.0
![Page 4: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/4.jpg)
Historys The versatility for dynamic information
display was understood by early digital media publishers in the late 1980s prior to the rise of the Internet. In the mid-1990s some practitioners of SGML had gained experience with the then-new World Wide Web, and believed that SGML offered solutions to some of the problems the Web was likely to face as it grew. SGML added to the list of W3C's activities when he in 1995; work began in mid-1996.
![Page 5: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/5.jpg)
History (Cont.) XML was compiled by a working group of eleven
members, supported by an (approximately) 150-member Interest Group. Technical debate took place on the Interest Group mailing list and issues were resolved by consensus or, when that failed, majority vote of the Working Group.
The name "XML“ has been selected. Other names that had been put forward for consideration included "MAGMA" (Minimal Architecture for Generalized Markup Applications), "SLIM" (Structured Language for Internet Markup) and "MGML" (Minimal Generalized Markup Language).
![Page 6: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/6.jpg)
History (Cont.) The XML Working Group never met face-
to-face. The major design decisions were reached in twenty weeks of intense work between July and November 1996, when the first Working Draft of an XML specification was published. Further design work continued through 1997, and XML 1.0 became a W3C Recommendation on February 10, 1998.
![Page 7: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/7.jpg)
The Data Problem How do I represent my “application”
data?
Performance (speed/time) Mutability Composition Security (encryption/identity)
![Page 8: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/8.jpg)
Data Problem (Cont.) Open Information Management:
Interpretation Presentation Interoperation Portability Interrogation
![Page 9: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/9.jpg)
Weaknesses of HTML Fixed set of tags
Not user extensible Dependency to “markup language” definition
process Dependency to vendors
Vendor proprietary tags Implementation not in sync
Netscape browser vs. IE Predefined semantics for each tag Predefined data structure
![Page 10: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/10.jpg)
Weaknesses of HTML (Cont.)
No formal validation Does not support semantic search Based on solely on appearance
(rendering) NOT on content Formatting too simple
Limited control Won’t do complex documents Poor support for print and other media
![Page 11: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/11.jpg)
Key Features of XML Extensibility Media and Presentation independence
Separation of contents from presentation Structure Validation
![Page 12: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/12.jpg)
Extensibility You define your own markup languages (tags)
for your own problem domain Infinite number of tags can be defined
Need for domain-specific standards Tags can be more than formatting Tags can be anything
Data relationship Formatting Anything you want
Many domain-specific markup languages Portable data within domain-specific industry Portable across the various domain
![Page 13: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/13.jpg)
Media (Presentation)Independence
Clear separation between contents and presentation
Contents of data What the data is Is represented by XML document
Presentation of data What the data looks like Can be specified by stylesheet (like css)
![Page 14: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/14.jpg)
Media (Presentation)Independence (Cont.)
Same data can be presented to different communication medium HTML browser Voice device
Same data can be presented to different format Cell phone as WML Desktop as HTML
![Page 15: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/15.jpg)
Separation of Contents fromPresentation
Searching and retrieving data is easy and efficient Tags give search’able information
Many applications use the same data in different ways Employee data can be used by
Payroll application Facilities application Human resource application
Enables portability of data Portable over time and space
![Page 16: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/16.jpg)
Structure: HTML vs. XMLHTML (Automatic Presentation of Data)<b> ali mohammad 1234 </b> // Display in bold
XML (Automatic Interpretation of Data)<Employee>
<Name><firstName> ali</firstName><lastName> mohammad</lastName>
</Name><EmployeeID> 1234 </EmployeeID>
</Employee>
![Page 17: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/17.jpg)
Structure Relationship
Employee is made of Name and employ-ID Name is made of firstName and LastName
Hierarchical (Tree-form) Faster to access Easier to rearrange Can be any number of depth
Enables to build large and complex data Portability of relationship and hierarchical
structure
![Page 18: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/18.jpg)
Validation In addition to being well-formed, an XML document
may be valid. This means that it contains a reference to a Document Type Definition (DTD).
XML data is “constrained” by a Rule (or Syntax) Employee data has to have Name and Employee ID elements
Name has to have both firstName and LastName elements
<Employee><Name><firstName> ali</firstName><lastName> mohammad</lastName></Name><EmployeeID> 1234 </EmployeeID>
</Employee>
![Page 19: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/19.jpg)
XML Document An XML document must start with an XML
declaration. It can include comments, XML processing
instructions, etc. It also has (exactly) one XML node (the
root node), which can have other nodes as children.
Note: XML is case-sensitive (unlike HTML)
![Page 20: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/20.jpg)
XML Document<?xml version="1.0" encoding="ISO-8859-1"?><!-- Edited with XML Spy v4.2 --><!DOCTYPE Employees_list SYSTEM "example.dtd"> < Employees>
<Employee><Name><firstName> ali</firstName><lastName> mohammad</lastName></Name><EmployeeID> 1234 </EmployeeID></Employee><Employee><Name><firstName> ahmad</firstName><lastName> hassen</lastName></Name><EmployeeID> 2345 </EmployeeID></Employee>
</ Employees >
![Page 21: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/21.jpg)
XML Document XML declaration – specifies the version
and character encoding (e.g., UTF-8 or ISO-8859-1)
Processing instructions – provide arbitrary “extra” information about the document (e.g., printing options)
Comments – who uses those, anyway?
![Page 22: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/22.jpg)
XML Document Tags – enclosed between < ... > Elements – include everything from the
start tag to the end tag Attributes – key=”value” pairs specified
in the start tag of an element Text nodes – special type of node that
contains (part of) text inside an element An XML document is really just a tree
![Page 23: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/23.jpg)
![Page 24: Xml Overview](https://reader033.fdocuments.us/reader033/viewer/2022061207/5484fb26b4af9f4d718b4604/html5/thumbnails/24.jpg)
Thank you for your patience