SlideShare a Scribd company logo
1 of 25
eXXtensible MMarkup LLanguage (XML)
By:
Albert Beng Kiat Tan
Ayzer Mungan
Edwin Hendriadi
Outline of Presentation
 Introduction
 Comparison between XML and HTML
 XML Syntax
 XML Queries and Mediators
 Challenges
 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
Comparisons
 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
XML HTML
Authoring XML
Elements
 An XML element is made up of a start tag, an end
tag, and data in between.
 Example:
<director> Matthew Dunn </director>
 Example of another element with the same value:
<actor> Matthew Dunn </actor>
 XML tags are case-sensitive:
<CITY> <City> <city>
 XML can abbreviate empty elements, for example:
<married> </married> can be abbreviated to
<married/>
Authoring XML
Elements (cont’d)
 An attribute is a name-value pair separated
by an equal sign (=).
 Example:
<City ZIP=“94608”> Emeryville </City>
 Attributes are used to attach additional,
secondary information to an element.
Authoring XML
Documents
 A basic XML document is an XML element
that can, but might not, include nested XML
elements.
 Example:
<books>
<book isbn=“123”>
<title> Second Chance </title>
<author> Matthew Dunn </author>
</book>
</books>
XML Data Model:
Example
<BOOKS>
<book id=“123”
loc=“library”>
<author>Hull</author>
<title>California</title>
<year> 1995 </year>
</book>
<article id=“555”
ref=“123”>
<author>Su</author>
<title> Purdue</title>
</article>
</BOOKS>
Hull Purdue
BOOKS
123 555
California
Su
titleauthor
title
author
article
book
year
1995
ref
loc=“library”
Authoring XML
Documents (cont’d)
 Authoring guidelines:
 All elements must have an end tag.
 All elements must be cleanly nested
(overlapping elements are not allowed).
 All attribute values must be enclosed in
quotation marks.
 Each document must have a unique first
element, the root node.
Authoring XML Data
Islands
 A data island is an XML document that exists
within an HTML page.
 The <XML> element marks the beginning of
the data island, and its ID attribute provides a
name that you can use to reference the data
island.
Authoring XML Data
Islands (cont’d)
 Example:
<XML ID=“XMLID”>
<customer>
<name> Mark Hanson </name>
<custID> 29085 </custID>
</customer>
</XML>
Document Type
Definitions (DTD)
 An XML document may have an optional
DTD.
 DTD serves as grammar for the underlying
XML document, and it is part of XML
language.
 DTDs are somewhat unsatisfactory, but no
consensus exists so far beyond the basic
DTDs.
 DTD has the form:
<!DOCTYPE name [markupdeclaration]>
DTD (cont’d)
 Consider an XML document:
<db><person><name>Alan</name>
<age>42</age>
<email>agb@usa.net </email>
</person>
<person>………</person>
……….
</db>
DTD (cont’d)
 DTD for it might be:
<!DOCTYPE db [
<!ELEMENT db (person*)>
<!ELEMENT person (name, age, email)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT email (#PCDATA)>
]>
DTD (cont’d)
Occurrence Indicator:
Indicator Occurrence
(no indicator) Required One and only
one
? Optional None or one
* Optional,
repeatable
None, one, or
more
+ Required,
repeatable
One or more
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 SQL’s select
XML-QL Query: Example 1
 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>
XML-QL Query: Example 2
 XML-QL query asking for all bookstores that sell
The Java Programming Language for under $25:
where <store>
<name> $N </name>
<book>
<title> The Java Programming Language </title>
<price> $P </price>
</book>
</store> in “www.store/bib.xml”
$P < 25
construct <result> $N </result>
Semistructured Data and
Mediators
 Semistructured data is often encountered in data
exchange and integration
 At the sources the data may be structured (e.g. from
relational databases)
 We model the data as semistructured to facilitate
exchange and integration
 Users see an integrated semistructured view that
they can query
 Queries are eventually reformulated into queries over
the structured resources (e.g. SQL)
 Only results need to be materialized
What is a mediator ?
 A complex software component that
integrates and transforms data from one or
several sources using a declarative
specification
 Two main contexts:
 Data conversion: converts data between
two different models
 e.g. by translating data from a relational
database into XML
 Data integration: integrates data from
different sources into a common view
Converting Relational
Database to XML
Example: Export the following data into XML and group
books by store
 Relational Database:
Store (sid, name, phone)
Book (bid, title, authors)
StoreBook (sid , bid, price, stock)
Store BookStoreBook
phone
authors
bidtitlesid
name
price stock
Converting Relational
Database to XML (Cont’d)
 XML:
<store> <name> … </name>
<phone> … </phone>
<book> <title>… </title>
<authors> … </authors>
<price> … </price>
</book>
<book>…</book>
…
</store>
Challenges facing XML
 Integration of data sharing
 Security

More Related Content

What's hot (20)

MYSQL - PHP Database Connectivity
MYSQL - PHP Database ConnectivityMYSQL - PHP Database Connectivity
MYSQL - PHP Database Connectivity
 
WSDL
WSDLWSDL
WSDL
 
javascript objects
javascript objectsjavascript objects
javascript objects
 
XSLT
XSLTXSLT
XSLT
 
XML
XMLXML
XML
 
Querying XML: XPath and XQuery
Querying XML: XPath and XQueryQuerying XML: XPath and XQuery
Querying XML: XPath and XQuery
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
Sgml
SgmlSgml
Sgml
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
03 namespace
03 namespace03 namespace
03 namespace
 
Xml
Xml Xml
Xml
 
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Xpath.ppt
Xpath.pptXpath.ppt
Xpath.ppt
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 

Viewers also liked

Viewers also liked (10)

Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Tema 2
Tema 2Tema 2
Tema 2
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
 
XML Schema (W3C)
XML Schema (W3C)XML Schema (W3C)
XML Schema (W3C)
 
XML.ppt
XML.pptXML.ppt
XML.ppt
 
XML and DTD
XML and DTDXML and DTD
XML and DTD
 
Xml
XmlXml
Xml
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
XML - What is XML?
XML - What is XML?XML - What is XML?
XML - What is XML?
 

Similar to XML Document Overview for Data Structuring

Similar to XML Document Overview for Data Structuring (20)

Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml nisha dwivedi
Xml nisha dwivediXml nisha dwivedi
Xml nisha dwivedi
 
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
Unit 10: XML and Beyond (Sematic Web, Web Services, ...)
 
[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond[DSBW Spring 2010] Unit 10: XML and Web And beyond
[DSBW Spring 2010] Unit 10: XML and Web And beyond
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depth
 
Xml
Xml Xml
Xml
 
XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
 
Xml schema
Xml schemaXml schema
Xml schema
 
Web page concept Basic
Web page concept  BasicWeb page concept  Basic
Web page concept Basic
 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
 
Xml
XmlXml
Xml
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
Xml sasidhar
Xml  sasidharXml  sasidhar
Xml sasidhar
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 
What is xml
What is xmlWhat is xml
What is xml
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 

More from Manish Chaurasia

Top 5 divine pilgrim places to visit in india
Top 5 divine pilgrim places to  visit in indiaTop 5 divine pilgrim places to  visit in india
Top 5 divine pilgrim places to visit in indiaManish Chaurasia
 
Top 5 exotic aquariums in india
Top 5 exotic aquariums in  indiaTop 5 exotic aquariums in  india
Top 5 exotic aquariums in indiaManish Chaurasia
 
Top 5 not to miss museums in india
Top 5 not to miss museums in  indiaTop 5 not to miss museums in  india
Top 5 not to miss museums in indiaManish Chaurasia
 
Top 5 big and famous fairs in india.
Top 5 big and famous fairs in  india.Top 5 big and famous fairs in  india.
Top 5 big and famous fairs in india.Manish Chaurasia
 
Top 5 chilly places to visit in india !
Top 5 chilly places to visit in  india !Top 5 chilly places to visit in  india !
Top 5 chilly places to visit in india !Manish Chaurasia
 
Top 5 less crowded tourist places in india.
Top 5 less crowded tourist places  in india.Top 5 less crowded tourist places  in india.
Top 5 less crowded tourist places in india.Manish Chaurasia
 
Shortcut keys-for-windows-10
Shortcut keys-for-windows-10Shortcut keys-for-windows-10
Shortcut keys-for-windows-10Manish Chaurasia
 
porter Five force analysis
porter Five force analysisporter Five force analysis
porter Five force analysisManish Chaurasia
 
4 E of corporate strategy
4 E of corporate strategy 4 E of corporate strategy
4 E of corporate strategy Manish Chaurasia
 
General Packet Radio Service
General Packet Radio ServiceGeneral Packet Radio Service
General Packet Radio ServiceManish Chaurasia
 
What are policies procedures guidelines standards
What are policies procedures guidelines standardsWhat are policies procedures guidelines standards
What are policies procedures guidelines standardsManish Chaurasia
 
Synopsis on social networking
Synopsis on social networkingSynopsis on social networking
Synopsis on social networkingManish Chaurasia
 
Cost of-poor-quality - juran institute
Cost of-poor-quality - juran instituteCost of-poor-quality - juran institute
Cost of-poor-quality - juran instituteManish Chaurasia
 
defect tracking and management
defect tracking and management   defect tracking and management
defect tracking and management Manish Chaurasia
 

More from Manish Chaurasia (20)

Top 5 divine pilgrim places to visit in india
Top 5 divine pilgrim places to  visit in indiaTop 5 divine pilgrim places to  visit in india
Top 5 divine pilgrim places to visit in india
 
Top 5 exotic aquariums in india
Top 5 exotic aquariums in  indiaTop 5 exotic aquariums in  india
Top 5 exotic aquariums in india
 
Top 5 not to miss museums in india
Top 5 not to miss museums in  indiaTop 5 not to miss museums in  india
Top 5 not to miss museums in india
 
Top 5 beaches in india
Top 5 beaches in indiaTop 5 beaches in india
Top 5 beaches in india
 
Top 5 big and famous fairs in india.
Top 5 big and famous fairs in  india.Top 5 big and famous fairs in  india.
Top 5 big and famous fairs in india.
 
Top 5 chilly places to visit in india !
Top 5 chilly places to visit in  india !Top 5 chilly places to visit in  india !
Top 5 chilly places to visit in india !
 
Top 5 less crowded tourist places in india.
Top 5 less crowded tourist places  in india.Top 5 less crowded tourist places  in india.
Top 5 less crowded tourist places in india.
 
Shortcut keys-for-windows-10
Shortcut keys-for-windows-10Shortcut keys-for-windows-10
Shortcut keys-for-windows-10
 
It strategy lecture
It strategy lectureIt strategy lecture
It strategy lecture
 
Importance of IT
Importance of ITImportance of IT
Importance of IT
 
porter Five force analysis
porter Five force analysisporter Five force analysis
porter Five force analysis
 
4 E of corporate strategy
4 E of corporate strategy 4 E of corporate strategy
4 E of corporate strategy
 
Campus recruitmen book
Campus recruitmen bookCampus recruitmen book
Campus recruitmen book
 
General Packet Radio Service
General Packet Radio ServiceGeneral Packet Radio Service
General Packet Radio Service
 
What are policies procedures guidelines standards
What are policies procedures guidelines standardsWhat are policies procedures guidelines standards
What are policies procedures guidelines standards
 
Synopsis on social networking
Synopsis on social networkingSynopsis on social networking
Synopsis on social networking
 
Case study olx
Case study olxCase study olx
Case study olx
 
Cost of-poor-quality - juran institute
Cost of-poor-quality - juran instituteCost of-poor-quality - juran institute
Cost of-poor-quality - juran institute
 
introduction to quality
 introduction to quality introduction to quality
introduction to quality
 
defect tracking and management
defect tracking and management   defect tracking and management
defect tracking and management
 

Recently uploaded

UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 

Recently uploaded (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 

XML Document Overview for Data Structuring

  • 1. eXXtensible MMarkup LLanguage (XML) By: Albert Beng Kiat Tan Ayzer Mungan Edwin Hendriadi
  • 2. Outline of Presentation  Introduction  Comparison between XML and HTML  XML Syntax  XML Queries and Mediators  Challenges  Summary
  • 3. 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
  • 4. 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
  • 5. Comparisons  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 XML HTML
  • 6. Authoring XML Elements  An XML element is made up of a start tag, an end tag, and data in between.  Example: <director> Matthew Dunn </director>  Example of another element with the same value: <actor> Matthew Dunn </actor>  XML tags are case-sensitive: <CITY> <City> <city>  XML can abbreviate empty elements, for example: <married> </married> can be abbreviated to <married/>
  • 7. Authoring XML Elements (cont’d)  An attribute is a name-value pair separated by an equal sign (=).  Example: <City ZIP=“94608”> Emeryville </City>  Attributes are used to attach additional, secondary information to an element.
  • 8. Authoring XML Documents  A basic XML document is an XML element that can, but might not, include nested XML elements.  Example: <books> <book isbn=“123”> <title> Second Chance </title> <author> Matthew Dunn </author> </book> </books>
  • 9. XML Data Model: Example <BOOKS> <book id=“123” loc=“library”> <author>Hull</author> <title>California</title> <year> 1995 </year> </book> <article id=“555” ref=“123”> <author>Su</author> <title> Purdue</title> </article> </BOOKS> Hull Purdue BOOKS 123 555 California Su titleauthor title author article book year 1995 ref loc=“library”
  • 10. Authoring XML Documents (cont’d)  Authoring guidelines:  All elements must have an end tag.  All elements must be cleanly nested (overlapping elements are not allowed).  All attribute values must be enclosed in quotation marks.  Each document must have a unique first element, the root node.
  • 11. Authoring XML Data Islands  A data island is an XML document that exists within an HTML page.  The <XML> element marks the beginning of the data island, and its ID attribute provides a name that you can use to reference the data island.
  • 12. Authoring XML Data Islands (cont’d)  Example: <XML ID=“XMLID”> <customer> <name> Mark Hanson </name> <custID> 29085 </custID> </customer> </XML>
  • 13. Document Type Definitions (DTD)  An XML document may have an optional DTD.  DTD serves as grammar for the underlying XML document, and it is part of XML language.  DTDs are somewhat unsatisfactory, but no consensus exists so far beyond the basic DTDs.  DTD has the form: <!DOCTYPE name [markupdeclaration]>
  • 14. DTD (cont’d)  Consider an XML document: <db><person><name>Alan</name> <age>42</age> <email>agb@usa.net </email> </person> <person>………</person> ………. </db>
  • 15. DTD (cont’d)  DTD for it might be: <!DOCTYPE db [ <!ELEMENT db (person*)> <!ELEMENT person (name, age, email)> <!ELEMENT name (#PCDATA)> <!ELEMENT age (#PCDATA)> <!ELEMENT email (#PCDATA)> ]>
  • 16. DTD (cont’d) Occurrence Indicator: Indicator Occurrence (no indicator) Required One and only one ? Optional None or one * Optional, repeatable None, one, or more + Required, repeatable One or more
  • 17. 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
  • 18. 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 SQL’s select
  • 19. XML-QL Query: Example 1  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>
  • 20. XML-QL Query: Example 2  XML-QL query asking for all bookstores that sell The Java Programming Language for under $25: where <store> <name> $N </name> <book> <title> The Java Programming Language </title> <price> $P </price> </book> </store> in “www.store/bib.xml” $P < 25 construct <result> $N </result>
  • 21. Semistructured Data and Mediators  Semistructured data is often encountered in data exchange and integration  At the sources the data may be structured (e.g. from relational databases)  We model the data as semistructured to facilitate exchange and integration  Users see an integrated semistructured view that they can query  Queries are eventually reformulated into queries over the structured resources (e.g. SQL)  Only results need to be materialized
  • 22. What is a mediator ?  A complex software component that integrates and transforms data from one or several sources using a declarative specification  Two main contexts:  Data conversion: converts data between two different models  e.g. by translating data from a relational database into XML  Data integration: integrates data from different sources into a common view
  • 23. Converting Relational Database to XML Example: Export the following data into XML and group books by store  Relational Database: Store (sid, name, phone) Book (bid, title, authors) StoreBook (sid , bid, price, stock) Store BookStoreBook phone authors bidtitlesid name price stock
  • 24. Converting Relational Database to XML (Cont’d)  XML: <store> <name> … </name> <phone> … </phone> <book> <title>… </title> <authors> … </authors> <price> … </price> </book> <book>…</book> … </store>
  • 25. Challenges facing XML  Integration of data sharing  Security