SlideShare uma empresa Scribd logo
1 de 42
eXtensible Markup Language (XML)
By:
Abhra Basak
Shoubhik Debnath
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
What is XML?
• eXtensible Markup Language
• Markup languages are for documents containing
structured information.
• Markup languages are designed for the processing,
definition and presentation of text
• 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 byWorldWide Web Consortium
(W3C) in 1998
• Bridge for data exchange on
theWeb
Why eXtensible ?
• Introducing Dynamic nature.
• Approaches to extensibility include facilities (sometimes called hooks) for
allowing users to insert their own program routines, the ability to define
new data types, and the ability to define new formatting markup tags.
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
Difference Between XML and
HTML
• XML is not a replacement for HTML.
• XML and HTML were designed with different goals:
1. XML was designed to transport and store
data, with focus on what data is
2. HTML was designed to display data, with
focus on how data looks
• HTML is about displaying information, while XML is about
carrying information.
Comparisons
• Extensible set of tags
• Content orientated
• Standard Data infrastructure
• Fixed set of tags
• Presentation oriented
• No data validation capabilities
XML HTML
XML Documents Form aTree
Structure
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">LearningXML</title>
<author>ErikT. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
XML Syntax Rules
1. All XML Elements Must Have a ClosingTag
• Legal Statement:
<p>This is a paragraph.</p>
<br />
XML Syntax Rules
2. XMLTags are Case Sensitive
• Legal Statement:
<Message>This is incorrect</message>
<message>This is correct</message>
XML Syntax Rules
3. XML Elements Must be Properly Nested
• Legal Statement:
<b><i>This text is bold and italic</i></b>
XML Syntax Rules
4. XML Documents Must Have a Root Element
• Legal Statement:
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
XML Syntax Rules
5. XML AttributeValues Must be Quoted
• Legal Statement:
<note date="12/11/2007">
<to>Tove</to>
<from>Jani</from>
</note>
XML Syntax Rules
6. Comments in XML
The syntax for writing comments in XML is similar to that of HTML.
<!--This is a comment -->
XML Syntax Rules
7. Entity References : Some characters have a special meaning in XML.
&lt; < less than
&gt; > greater than
&amp; & ampersand
&apos; ' apostrophe
&quot; " quotation mark
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
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.
XML Elements vs.
Attributes
<person sex="female">
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
sex is an ATTRIBUTE
<person>
<sex>female</sex>
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
sex is an ELEMENT
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”
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
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>
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
DocumentType 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)>
]>
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
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 byW3C for standardization
• CurrentlyW3C 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 TheJava
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>
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
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>
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
XMLTechnologies
• XHTML (Extensible HTML) :A stricter and cleaner XML based version of
HTML.
• XML DOM (XML Document Object Model) : A standard document model for
accessing and manipulatingXML.
• XSL (Extensible Style Sheet Language) XSL consists of three parts:
1. XSLT (XSLTransform) - transforms XML into other formats, like HTML
2. XSL-FO (XSL Formatting Objects)- for formatting XML to screen, paper, etc
3. XPath - a language for navigatingXML documents
• XQuery (XML Query Language) :An XML based language for querying XML
data.
• DTD (DocumentType Definition) :A standard for defining the legal elements
in an XML document.
Journey Ahead…….
• Introduction
• Comparison between XML and HTML
• XML Syntax
• XML Elements v/s Attributes
• XML Data Islands
• DocumentType Definition
• XML Query Languages
• Converting Relational Database to XML
• XMLTechnologies
• Role of XML inWBIM
Role of XML inWBIM
• XML is very easy to understand.
• An efficient method for Information Storage and Retrieval – Its simple
syntax enables that unlike RDBMS.
• There are obviously some security concerns. So, future work on XML
Security is promising.
THANKYOU
Comments and Questions
are most welcome!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Xml presentation
Xml presentationXml presentation
Xml presentation
 
Introduction to XML and Databases
Introduction to XML and DatabasesIntroduction to XML and Databases
Introduction to XML and Databases
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Markup Languages
Markup Languages Markup Languages
Markup Languages
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
XML
XMLXML
XML
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
DTD
DTDDTD
DTD
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML
XMLXML
XML
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Xml schema
Xml schemaXml schema
Xml schema
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
 
HTML and XML Difference FAQs
HTML and XML Difference FAQsHTML and XML Difference FAQs
HTML and XML Difference FAQs
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
 
00 introduction
00 introduction00 introduction
00 introduction
 
Xml basics
Xml basicsXml basics
Xml basics
 
Dtd
DtdDtd
Dtd
 

Destaque

REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service家弘 周
 
Network topology
Network topologyNetwork topology
Network topologylekshmik
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Xml Publisher And Reporting To Excel
Xml Publisher And Reporting To ExcelXml Publisher And Reporting To Excel
Xml Publisher And Reporting To ExcelDuncan Davies
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLyht4ever
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentationguest0df6b0
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service DesignLorna Mitchell
 
Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTPradeep Kumar
 

Destaque (13)

Xml dtd
Xml dtdXml dtd
Xml dtd
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
 
Network topology
Network topologyNetwork topology
Network topology
 
Intro xml
Intro xmlIntro xml
Intro xml
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Xml Publisher And Reporting To Excel
Xml Publisher And Reporting To ExcelXml Publisher And Reporting To Excel
Xml Publisher And Reporting To Excel
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentation
 
Best Practices in Web Service Design
Best Practices in Web Service DesignBest Practices in Web Service Design
Best Practices in Web Service Design
 
Introduction to Web Service
Introduction to Web Service Introduction to Web Service
Introduction to Web Service
 
Webservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and RESTWebservices Overview : XML RPC, SOAP and REST
Webservices Overview : XML RPC, SOAP and REST
 

Semelhante a Introduction to XML (20)

Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml nisha dwivedi
Xml nisha dwivediXml nisha dwivedi
Xml nisha dwivedi
 
Xml passing in java
Xml passing in javaXml passing in java
Xml passing in java
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
Xml
XmlXml
Xml
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml
XmlXml
Xml
 
Chapter4
Chapter4Chapter4
Chapter4
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depth
 
Xml
XmlXml
Xml
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
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, ...)
 
msc_xml1.ppt
msc_xml1.pptmsc_xml1.ppt
msc_xml1.ppt
 
msc_xml1.ppt
msc_xml1.pptmsc_xml1.ppt
msc_xml1.ppt
 

Mais de Abhra Basak

FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...
FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...
FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...Abhra Basak
 
Concurrency in java
Concurrency in javaConcurrency in java
Concurrency in javaAbhra Basak
 
Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...
Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...
Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...Abhra Basak
 
Spanner - Google distributed database
Spanner - Google distributed databaseSpanner - Google distributed database
Spanner - Google distributed databaseAbhra Basak
 
DADAGIRI - The Fire Within
DADAGIRI - The Fire WithinDADAGIRI - The Fire Within
DADAGIRI - The Fire WithinAbhra Basak
 
Usability evaluation of the IIT Mandi Website
Usability evaluation of the IIT Mandi WebsiteUsability evaluation of the IIT Mandi Website
Usability evaluation of the IIT Mandi WebsiteAbhra Basak
 
Course Recommender
Course RecommenderCourse Recommender
Course RecommenderAbhra Basak
 
National Stock Exchange and Nasdaq 100
National Stock Exchange and Nasdaq 100National Stock Exchange and Nasdaq 100
National Stock Exchange and Nasdaq 100Abhra Basak
 

Mais de Abhra Basak (8)

FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...
FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...
FINANCIAL MARKET PREDICTION AND PORTFOLIO OPTIMIZATION USING FUZZY DECISION T...
 
Concurrency in java
Concurrency in javaConcurrency in java
Concurrency in java
 
Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...
Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...
Privacy Preservation Issues in Association Rule Mining in Horizontally Partit...
 
Spanner - Google distributed database
Spanner - Google distributed databaseSpanner - Google distributed database
Spanner - Google distributed database
 
DADAGIRI - The Fire Within
DADAGIRI - The Fire WithinDADAGIRI - The Fire Within
DADAGIRI - The Fire Within
 
Usability evaluation of the IIT Mandi Website
Usability evaluation of the IIT Mandi WebsiteUsability evaluation of the IIT Mandi Website
Usability evaluation of the IIT Mandi Website
 
Course Recommender
Course RecommenderCourse Recommender
Course Recommender
 
National Stock Exchange and Nasdaq 100
National Stock Exchange and Nasdaq 100National Stock Exchange and Nasdaq 100
National Stock Exchange and Nasdaq 100
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

Introduction to XML

  • 1. eXtensible Markup Language (XML) By: Abhra Basak Shoubhik Debnath
  • 2. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 3. What is XML? • eXtensible Markup Language • Markup languages are for documents containing structured information. • Markup languages are designed for the processing, definition and presentation of text • 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 byWorldWide Web Consortium (W3C) in 1998 • Bridge for data exchange on theWeb
  • 5. Why eXtensible ? • Introducing Dynamic nature. • Approaches to extensibility include facilities (sometimes called hooks) for allowing users to insert their own program routines, the ability to define new data types, and the ability to define new formatting markup tags.
  • 6. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 7. Difference Between XML and HTML • XML is not a replacement for HTML. • XML and HTML were designed with different goals: 1. XML was designed to transport and store data, with focus on what data is 2. HTML was designed to display data, with focus on how data looks • HTML is about displaying information, while XML is about carrying information.
  • 8. Comparisons • Extensible set of tags • Content orientated • Standard Data infrastructure • Fixed set of tags • Presentation oriented • No data validation capabilities XML HTML
  • 9. XML Documents Form aTree Structure <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">LearningXML</title> <author>ErikT. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
  • 10. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 11. XML Syntax Rules 1. All XML Elements Must Have a ClosingTag • Legal Statement: <p>This is a paragraph.</p> <br />
  • 12. XML Syntax Rules 2. XMLTags are Case Sensitive • Legal Statement: <Message>This is incorrect</message> <message>This is correct</message>
  • 13. XML Syntax Rules 3. XML Elements Must be Properly Nested • Legal Statement: <b><i>This text is bold and italic</i></b>
  • 14. XML Syntax Rules 4. XML Documents Must Have a Root Element • Legal Statement: <root> <child> <subchild>.....</subchild> </child> </root>
  • 15. XML Syntax Rules 5. XML AttributeValues Must be Quoted • Legal Statement: <note date="12/11/2007"> <to>Tove</to> <from>Jani</from> </note>
  • 16. XML Syntax Rules 6. Comments in XML The syntax for writing comments in XML is similar to that of HTML. <!--This is a comment -->
  • 17. XML Syntax Rules 7. Entity References : Some characters have a special meaning in XML. &lt; < less than &gt; > greater than &amp; & ampersand &apos; ' apostrophe &quot; " quotation mark
  • 18. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 19. 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/>
  • 20. 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.
  • 21. XML Elements vs. Attributes <person sex="female"> <firstname>Anna</firstname> <lastname>Smith</lastname> </person> sex is an ATTRIBUTE <person> <sex>female</sex> <firstname>Anna</firstname> <lastname>Smith</lastname> </person> sex is an ELEMENT
  • 22. 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”
  • 23. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 24. 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.
  • 25. Authoring XML Data Islands (cont’d) • Example: <XML ID=“XMLID”> <customer> <name> Mark Hanson </name> <custID> 29085 </custID> </customer> </XML>
  • 26. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 27. DocumentType 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]>
  • 28. DTD (cont’d) • Consider an XML document: <db><person><name>Alan</name> <age>42</age> <email>agb@usa.net </email> </person> <person>………</person> ………. </db>
  • 29. 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)> ]>
  • 30. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 31. 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 byW3C for standardization • CurrentlyW3C is considering and working on a new query language: XQuery
  • 32. 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
  • 33. 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>
  • 34. XML-QL Query: Example 2 • XML-QL query asking for all bookstores that sell TheJava 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>
  • 35. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 36. 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
  • 37. Converting Relational Database to XML (Cont’d) • XML: <store> <name> … </name> <phone> … </phone> <book> <title>… </title> <authors> … </authors> <price> … </price> </book> <book>…</book> … </store>
  • 38. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 39. XMLTechnologies • XHTML (Extensible HTML) :A stricter and cleaner XML based version of HTML. • XML DOM (XML Document Object Model) : A standard document model for accessing and manipulatingXML. • XSL (Extensible Style Sheet Language) XSL consists of three parts: 1. XSLT (XSLTransform) - transforms XML into other formats, like HTML 2. XSL-FO (XSL Formatting Objects)- for formatting XML to screen, paper, etc 3. XPath - a language for navigatingXML documents • XQuery (XML Query Language) :An XML based language for querying XML data. • DTD (DocumentType Definition) :A standard for defining the legal elements in an XML document.
  • 40. Journey Ahead……. • Introduction • Comparison between XML and HTML • XML Syntax • XML Elements v/s Attributes • XML Data Islands • DocumentType Definition • XML Query Languages • Converting Relational Database to XML • XMLTechnologies • Role of XML inWBIM
  • 41. Role of XML inWBIM • XML is very easy to understand. • An efficient method for Information Storage and Retrieval – Its simple syntax enables that unlike RDBMS. • There are obviously some security concerns. So, future work on XML Security is promising.