SlideShare a Scribd company logo
1 of 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!

More Related Content

What's hot (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
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Recently uploaded (20)

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

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.