SlideShare ist ein Scribd-Unternehmen logo
1 von 22
XML

Submitted BY :
Alsnabani Aleem
Almaqashi Saleem
Ameeta

48
49
50
Abstraction .
•
•
•
•

Structure of XML Data
Xml Querying and Transformation
Storage of XML Data
XML Applications
Introduction
•
•
•
•

•

XML: Extensible Markup Language
Defined by the WWW Consortium (W3C)
Derived from SGML (Standard Generalized Markup Language),
but simpler to use than SGML
Documents have tags giving extra information about sections of
the document
– E.g. <title> XML </title> <slide> Introduction …</slide>
Extensible, unlike HTML
– Users can add new tags, and s e p a ra te ly specify how the tag
should be handled for display
Con…..
•

The ability to specify new tags, and to create nested tag structures
make XML a great way to exchange data, not just documents.
– Much of the use of XML has been in data exchange applications, not
as a replacement for HTML

•

Tags make data (relatively) self-documenting
– E.g.
<bank>
<account>
<account_number> A-101 </account_number>
<branch_name>
Downtown </branch_name>
<balance>
500
</balance>
</account>
<depositor>
<account_number> A-101 </account_number>
<customer_name> Johnson </customer_name>
</depositor>
</bank>
XML: Motivation
•

•
•

Data interchange is critical in today’s networked world
– Examples:
• Banking: funds transfer
• Order processing (especially inter-company orders)
• Scientific data
– Chemistry: ChemML, …
– Genetics: BSML (Bio-Sequence Markup Language),
…
– Paper flow of information between organizations is being
replaced by electronic flow of information
Each application area has its own set of standards for representing
information
XML has become the basis for all new generation data interchange
formats
Structure of XML Data
•
•
•

•

Tag: label for a section of data
Element: section of data beginning with <ta g na m e > and ending
with matching </ta g na m e >
Elements must be properly nested
– Proper nesting
• <account> … <balance> …. </balance> </account>
– Improper nesting
• <account> … <balance> …. </account> </balance>
– Formally: every start tag must have a unique matching end
tag, that is in the context of the same parent element.
Every document must have a single top-level element
Cont…..
•

Mixture of text with sub-elements is legal in XML.
– Example:
<account>
This account is seldom used any more.
<account_number> A-102</account_number>
<branch_name> Perryridge</branch_name>
<balance>400 </balance>
</account>
– Useful for document markup, but discouraged for data
representation
Attributes
•

•
•

Elements can have attributes
<account acct-type = “checking” >
<account_number> A-102 </account_number>
<branch_name> Perryridge </branch_name>
<balance> 400 </balance>
</account>
Attributes are specified by na m e = va lue pairs inside the starting tag
of an element
An element may have several attributes, but each attribute name
can only occur once
<account acct-type = “checking” monthlyfee=“5”>
Complex Example of XML
<States>
<State>
<Name>NewJersy</Name>
<Number>1</Number>
</State>
<State>
<Name>NewYork</Name>
<Number>2<Number>
</State>
<Gov>
<Location>Washington</Location>
</Gov>
</States>
Tree Representation of XML
S ta te s
S ta te

S ta te

G ov

Nam e

N um ber

Nam e

N um ber

L o c a t io n

N e w J e rs y

1

N e w Y o rk

2

W a s h in g t o n
XML Document Schema
•
•
•

•

Database schemas constrain what information can be stored, and
the data types of stored values
XML documents are not required to have an associated schema
However, schemas are very important for XML data exchange
– Otherwise, a site cannot automatically interpret data received
from another site
Two mechanisms for specifying XML schema
– Document Type Definition (DTD)
• Widely used
– XML Schema
• Newer, increasing use
Document Type Definition (DTD)
•
•

•
•

The type of an XML document can be specified using a DTD
DTD constraints structure of XML data
– What elements can occur
– What attributes can/must an element have
– What subelements can/must occur inside each element, and
how many times.
DTD does not constrain data types
– All values represented as strings in XML
DTD syntax
– <!ELEMENT element (subelements-specification) >
– <!ATTLIST element (attributes) >
Importance of XML
•
•
•
•

Extensible Markup Language (XML) is fast emerging as the
dominant standard for representing data on the Internet.
Most organizations use XML as a data communication
standard.
All commercial development frameworks are XML oriented
(.NET, Java).
All modern web systems architecture is designed based on
XML.
XML Querying
•

XPath
– An XPath expression returns a collection of element nodes that
satisfy certain patterns specified in the expression.
– The names in the XPath expression are node names in the
XML document tree that are either tag (element) names or
attribute names, possibly with additional qualifier conditions to
further restrict the nodes that satisfy the pattern
XPath
– There are two main separators when specifying a
path:
• single slash (/) and double slash (//)
– A single slash before a tag specifies that the tag must
appear as a direct child of the previous (parent) tag,
whereas a double slash specifies that the tag can
appear as a descendant of the previous tag at any
level.

– It is customary to include the file name in any
XPath query allowing us to specify any local file
name or path name that specifies the path.
– doc(www.company.com/info.XML)/company =>
COMPANY XML doc
XQuery
– XQuery uses XPath expressions, but has
additional constructs.

– XQuery permits the specification of more general
queries on one or more XML documents.
– The typical form of a query in XQuery is known as
a FLW expression, which stands for the four main
R
clauses of XQuery and has the following form:
• FOR <variable bindings to individual nodes
(elements)>
• LET <variable bindings to collections of nodes
(elements)>
• W
HERE <qualifier conditions>
• RETURN <query result specification>
Storage of XML Data
•

XML data can be stored in

– Non-relational data stores
• Flat files
– Natural for storing XML
• XML database
– Database built specifically for storing XML data,
supporting DOM model and declarative querying
– Currently no commercial-grade systems

– Relational databases
• Data must be translated into relational form
• Advantage: mature database systems
• Disadvantages: overhead of translating data and queries
Applications of XML
•
•
•
•
•

•

XML has a variety of uses for Web, e-business, and
portable applications.
The following are some of the many applications for which
XML is useful:
W publishing: XML allows you to create interactive pages
eb
.
Metadata applications: XML makes it easier to express
metadata
W searching and automating W tasks: XML defines the
eb
eb
type of information contained in a document, making it
easier to return useful results when searching the Web: in a
portable, reusable format.
HTML , WML . .. etc
Advantages of XML
•
•
•
•

XML is an open standard.
It is human readable and not cryptic like a machine
language.
XML processing is easy.
It can be used to integrate complex web based
systems(using XML as communication).
Conclusion
•

XML is more than just a text format for describing
documents. It is a mechanism for describing structured
and semi-structured data, which provides access to a
rich family of technologies for processing such data.
Powerful abstractions like the XML Information Set open
the door to processing non-textual data such as file
systems, the Windows® registry, relational databases
and even programming language objects using XML
technologies. XML brings us one step closer to
universal data access.
REFRENCES
-"XML Media Types, RFC 3023“
• http://web.archive.org/web/20110514120305/http://divei
ntomark.org/archives/2004/01/08/postels-law
•

^ "XML and Semantic Web W3C Standards Timeline“

•

^ "Extensible Markup Language (XML) 1.0 (Fifth
Edition)“

•

^ "W3C I18N FAQ: HTML, XHTML, XML and Control
Codes"
Thank You !!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Unit 2.2
Unit 2.2Unit 2.2
Unit 2.2
 
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
 
Xml data transformation
Xml data transformationXml data transformation
Xml data transformation
 
Creating xml publisher documents with people code
Creating xml publisher documents with people codeCreating xml publisher documents with people code
Creating xml publisher documents with people code
 
02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documents
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xml
 
Xml 1
Xml 1Xml 1
Xml 1
 
XML
XMLXML
XML
 
00 introduction
00 introduction00 introduction
00 introduction
 
paper about xml
paper about xmlpaper about xml
paper about xml
 
Xml applications
Xml applicationsXml applications
Xml applications
 
XML
XMLXML
XML
 
XML DTD Validate
XML DTD ValidateXML DTD Validate
XML DTD Validate
 
XML Databases
XML DatabasesXML Databases
XML Databases
 
XML
XMLXML
XML
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Xml iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
 
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)
 
Introduction to Oracle
Introduction to OracleIntroduction to Oracle
Introduction to Oracle
 
Intro xml
Intro xmlIntro xml
Intro xml
 

Ähnlich wie Xmll (20)

xml.pptx
xml.pptxxml.pptx
xml.pptx
 
IT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notesIT6801-Service Oriented Architecture- UNIT-I notes
IT6801-Service Oriented Architecture- UNIT-I notes
 
Xml programming language myassignmenthelp.net
Xml programming  language myassignmenthelp.netXml programming  language myassignmenthelp.net
Xml programming language myassignmenthelp.net
 
Xml passing in java
Xml passing in javaXml passing in java
Xml passing in java
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
 
XML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptxXML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptx
 
Xml
XmlXml
Xml
 
WT UNIT-2 XML.pdf
WT UNIT-2 XML.pdfWT UNIT-2 XML.pdf
WT UNIT-2 XML.pdf
 
Xml
XmlXml
Xml
 
XML1.pptx
XML1.pptxXML1.pptx
XML1.pptx
 
BITM3730 10-31.pptx
BITM3730 10-31.pptxBITM3730 10-31.pptx
BITM3730 10-31.pptx
 
XML notes.pptx
XML notes.pptxXML notes.pptx
XML notes.pptx
 
Android de la A a la Z XML Ulises Gonzalez
Android de la A a la Z  XML Ulises GonzalezAndroid de la A a la Z  XML Ulises Gonzalez
Android de la A a la Z XML Ulises Gonzalez
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
XML
XMLXML
XML
 
BITM3730 10-18.pptx
BITM3730 10-18.pptxBITM3730 10-18.pptx
BITM3730 10-18.pptx
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 

Mehr von Saleem Almaqashi

Mehr von Saleem Almaqashi (7)

acceptance testing
acceptance testingacceptance testing
acceptance testing
 
Dsl
DslDsl
Dsl
 
Internet multimedia
Internet multimediaInternet multimedia
Internet multimedia
 
Ai software in everyday life
Ai software in everyday lifeAi software in everyday life
Ai software in everyday life
 
Medical center using Data warehousing
Medical center using Data warehousingMedical center using Data warehousing
Medical center using Data warehousing
 
Simulation in terminated system
Simulation in terminated system Simulation in terminated system
Simulation in terminated system
 
Dif fft
Dif fftDif fft
Dif fft
 

Kürzlich hochgeladen

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 

Kürzlich hochgeladen (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

Xmll

  • 1. XML Submitted BY : Alsnabani Aleem Almaqashi Saleem Ameeta 48 49 50
  • 2. Abstraction . • • • • Structure of XML Data Xml Querying and Transformation Storage of XML Data XML Applications
  • 3. Introduction • • • • • XML: Extensible Markup Language Defined by the WWW Consortium (W3C) Derived from SGML (Standard Generalized Markup Language), but simpler to use than SGML Documents have tags giving extra information about sections of the document – E.g. <title> XML </title> <slide> Introduction …</slide> Extensible, unlike HTML – Users can add new tags, and s e p a ra te ly specify how the tag should be handled for display
  • 4. Con….. • The ability to specify new tags, and to create nested tag structures make XML a great way to exchange data, not just documents. – Much of the use of XML has been in data exchange applications, not as a replacement for HTML • Tags make data (relatively) self-documenting – E.g. <bank> <account> <account_number> A-101 </account_number> <branch_name> Downtown </branch_name> <balance> 500 </balance> </account> <depositor> <account_number> A-101 </account_number> <customer_name> Johnson </customer_name> </depositor> </bank>
  • 5. XML: Motivation • • • Data interchange is critical in today’s networked world – Examples: • Banking: funds transfer • Order processing (especially inter-company orders) • Scientific data – Chemistry: ChemML, … – Genetics: BSML (Bio-Sequence Markup Language), … – Paper flow of information between organizations is being replaced by electronic flow of information Each application area has its own set of standards for representing information XML has become the basis for all new generation data interchange formats
  • 6. Structure of XML Data • • • • Tag: label for a section of data Element: section of data beginning with <ta g na m e > and ending with matching </ta g na m e > Elements must be properly nested – Proper nesting • <account> … <balance> …. </balance> </account> – Improper nesting • <account> … <balance> …. </account> </balance> – Formally: every start tag must have a unique matching end tag, that is in the context of the same parent element. Every document must have a single top-level element
  • 7. Cont….. • Mixture of text with sub-elements is legal in XML. – Example: <account> This account is seldom used any more. <account_number> A-102</account_number> <branch_name> Perryridge</branch_name> <balance>400 </balance> </account> – Useful for document markup, but discouraged for data representation
  • 8. Attributes • • • Elements can have attributes <account acct-type = “checking” > <account_number> A-102 </account_number> <branch_name> Perryridge </branch_name> <balance> 400 </balance> </account> Attributes are specified by na m e = va lue pairs inside the starting tag of an element An element may have several attributes, but each attribute name can only occur once <account acct-type = “checking” monthlyfee=“5”>
  • 9. Complex Example of XML <States> <State> <Name>NewJersy</Name> <Number>1</Number> </State> <State> <Name>NewYork</Name> <Number>2<Number> </State> <Gov> <Location>Washington</Location> </Gov> </States>
  • 10. Tree Representation of XML S ta te s S ta te S ta te G ov Nam e N um ber Nam e N um ber L o c a t io n N e w J e rs y 1 N e w Y o rk 2 W a s h in g t o n
  • 11. XML Document Schema • • • • Database schemas constrain what information can be stored, and the data types of stored values XML documents are not required to have an associated schema However, schemas are very important for XML data exchange – Otherwise, a site cannot automatically interpret data received from another site Two mechanisms for specifying XML schema – Document Type Definition (DTD) • Widely used – XML Schema • Newer, increasing use
  • 12. Document Type Definition (DTD) • • • • The type of an XML document can be specified using a DTD DTD constraints structure of XML data – What elements can occur – What attributes can/must an element have – What subelements can/must occur inside each element, and how many times. DTD does not constrain data types – All values represented as strings in XML DTD syntax – <!ELEMENT element (subelements-specification) > – <!ATTLIST element (attributes) >
  • 13. Importance of XML • • • • Extensible Markup Language (XML) is fast emerging as the dominant standard for representing data on the Internet. Most organizations use XML as a data communication standard. All commercial development frameworks are XML oriented (.NET, Java). All modern web systems architecture is designed based on XML.
  • 14. XML Querying • XPath – An XPath expression returns a collection of element nodes that satisfy certain patterns specified in the expression. – The names in the XPath expression are node names in the XML document tree that are either tag (element) names or attribute names, possibly with additional qualifier conditions to further restrict the nodes that satisfy the pattern
  • 15. XPath – There are two main separators when specifying a path: • single slash (/) and double slash (//) – A single slash before a tag specifies that the tag must appear as a direct child of the previous (parent) tag, whereas a double slash specifies that the tag can appear as a descendant of the previous tag at any level. – It is customary to include the file name in any XPath query allowing us to specify any local file name or path name that specifies the path. – doc(www.company.com/info.XML)/company => COMPANY XML doc
  • 16. XQuery – XQuery uses XPath expressions, but has additional constructs. – XQuery permits the specification of more general queries on one or more XML documents. – The typical form of a query in XQuery is known as a FLW expression, which stands for the four main R clauses of XQuery and has the following form: • FOR <variable bindings to individual nodes (elements)> • LET <variable bindings to collections of nodes (elements)> • W HERE <qualifier conditions> • RETURN <query result specification>
  • 17. Storage of XML Data • XML data can be stored in – Non-relational data stores • Flat files – Natural for storing XML • XML database – Database built specifically for storing XML data, supporting DOM model and declarative querying – Currently no commercial-grade systems – Relational databases • Data must be translated into relational form • Advantage: mature database systems • Disadvantages: overhead of translating data and queries
  • 18. Applications of XML • • • • • • XML has a variety of uses for Web, e-business, and portable applications. The following are some of the many applications for which XML is useful: W publishing: XML allows you to create interactive pages eb . Metadata applications: XML makes it easier to express metadata W searching and automating W tasks: XML defines the eb eb type of information contained in a document, making it easier to return useful results when searching the Web: in a portable, reusable format. HTML , WML . .. etc
  • 19. Advantages of XML • • • • XML is an open standard. It is human readable and not cryptic like a machine language. XML processing is easy. It can be used to integrate complex web based systems(using XML as communication).
  • 20. Conclusion • XML is more than just a text format for describing documents. It is a mechanism for describing structured and semi-structured data, which provides access to a rich family of technologies for processing such data. Powerful abstractions like the XML Information Set open the door to processing non-textual data such as file systems, the Windows® registry, relational databases and even programming language objects using XML technologies. XML brings us one step closer to universal data access.
  • 21. REFRENCES -"XML Media Types, RFC 3023“ • http://web.archive.org/web/20110514120305/http://divei ntomark.org/archives/2004/01/08/postels-law • ^ "XML and Semantic Web W3C Standards Timeline“ • ^ "Extensible Markup Language (XML) 1.0 (Fifth Edition)“ • ^ "W3C I18N FAQ: HTML, XHTML, XML and Control Codes"