SlideShare a Scribd company logo
What is XML?
 a meta language that allows you to
create and format your own
document markups
 a method for putting structured data
into a text file; these files are
- easy to read
- unambiguous
- extensible
- platform-independent
What is XML?
 a family of technologies:
- XML 1.0
- Xlink
- Xpointer & Xfragments
- CSS, XSL, XSLT
- DOM
- XML Namespaces
- XML Schemas
XML Facts
 officially recommended by W3C
since 1998
 a simplified form of SGML (Standard
Generalized Markup Language)
 primarily created by Jon Bosak of
Sun Microsystems
XML Facts
 important because it removes two
constraints which were holding
back Web developments:
1. dependence on a single, inflexible
document type (HTML);
2. the complexity of full SGML, whose
syntax allows many powerful but
hard-to-program options
Quick Comparison
 HTML
- uses tags and
attributes
- content and formatting
can be placed
together
<p><font=”Arial”>text</font>
- tags and attributes are
pre-determined and
rigid
 XML
- uses tags and
attributes
- content and format are
separate; formatting
is contained in a
stylesheet
- allows user to specify
what each tag and
attribute means
Importance of being able to
define tags and attributes
 document types can be explicitly
tailored to an audience
 the linking abilities are more
powerful
- bidirectional and multi-way link
- link to a span of text, not just a single
point
The pieces
 there are 3 components for XML
content:
- the XML document
- DTD (Document Type Declaration)
- XSL (Extensible Stylesheet Language)
 The DTD and XSL do not need to be
present in all cases
A well-formed XML
document
 elements have an open and close tag,
unless it is an empty element
 attribute values are quoted
 if a tag is an empty element, it has a
closing / before the end of the tag
 open and close tags are nested correctly
 there are no isolated mark-up characters
in the text (i.e. < > & ]]>)
 if there is no DTD, all attributes are of
type CDATA by default
A valid XML document
 has an associated DTD and complies
with the constraints in the DTD
XML basics
 <?xml ?> the XML declaration
- not required, but typically used
- attributes include:
version
encoding – the character encoding used in
the document
standalone –if an external DTD is required
<?xml version=”1.0” encoding=”UTF-8”>
<?xml version=”1.0” standalone=”yes”>
XML basics
 <!DOCTYPE …> to specify a DTD
for the document
2 forms:
<!DOCTYPE root-element SYSTEM “URIofDTD”>
<!DOCTYPE root-element PUBLIC “name”
“URIofDTD”>
XML basics
 <!-- --> comments
- contents are ignored by the processor
- cannot come before the XML declaration
- cannot appear inside an element tag
- may not include double hyphens
XML basics
 <tag> text </tag> an element
- can contain text, other elements or a
combination
- element name:
-must start with a letter or underscore and
can have any number of letters, numbers,
hyphens, periods, or underscores
- case-sensitive;
- may not start with xml
XML basics
Elements (continued)
 can be a parent, grandparent,
grandchild, ancestor, or descendant
 each element tag can be divided
into 2 parts – namespace:tag name
XML basics
 Namespaces:
- not mandatory, but useful in giving
uniqueness to an element
- help avoid element collision
- declared using the xmlns:name=value
attribute; a URI is recommended for
value
- can be an attribute of any element; the
scope is inside the element’s tags
XML basics
 Namespaces (continued):
- may define more than 1 per element
- if no name given after xmlns prefix,
uses the default namespace which is
applied to all elements in the defining
element without their own namespace
- can set default namespace to an empty
string to ensure no default namespace is
in use within an element
XML basics
 key=”value” an attribute
- describes additional information about
an element
<tag key=”value”> text</tag>
- value must always be quoted
- key names have same restrictions as
element names
- reserved attributes are
- xml:lang
- xml:space
XML basics
 <tag></tag> OR <tag/> empty
element
- has no text
- used to add nontextual content or to
provide additional information to parser
 <? ?> processing instruction
- for attributes specific to an outside
application
XML basics
 <![CDATA[ ]]>
- to define special sections of character
data which the processor does not
interpret as markup
- anything inside is treated as plain text

More Related Content

PPT
XML Presentation-2
PPT
Xml Presentation-1
PPT
Xml Presentation-3
PPTX
XML, DTD & XSD Overview
PDF
XML
PPT
XML Schema
PPT
Xml by Luqman
XML Presentation-2
Xml Presentation-1
Xml Presentation-3
XML, DTD & XSD Overview
XML
XML Schema
Xml by Luqman

What's hot (19)

PPT
01 xml document structure
PPTX
Xml presentation
PDF
Introduction to XML
PPTX
Xml dtd
PPT
EXtensible Markup Language
PPT
PPTX
Unit 5 xml (1)
PPTX
Introduction to xml
PPT
02 xml schema
PPTX
Xml dtd
PPTX
DTD
PPTX
ODP
PPTX
Xml basics
PPTX
Xml schema
PDF
Building XML Based Applications
DOCX
Introduction to xml schema
01 xml document structure
Xml presentation
Introduction to XML
Xml dtd
EXtensible Markup Language
Unit 5 xml (1)
Introduction to xml
02 xml schema
Xml dtd
DTD
Xml basics
Xml schema
Building XML Based Applications
Introduction to xml schema
Ad

Viewers also liked (8)

PPT
Introduction to XML
PPTX
Xml ppt
PPTX
History in HTML
PPTX
A Brief History of Web publishing (from HTML to WordPress)
PPTX
Web publishing
PPS
XML - What is XML?
Introduction to XML
Xml ppt
History in HTML
A Brief History of Web publishing (from HTML to WordPress)
Web publishing
XML - What is XML?
Ad

Similar to Xml1111 (20)

PPT
Ch2 neworder
PPT
Introduction to xml
PDF
XMLin Web development and Applications.pdf
PDF
XML for Web Development Information tech.pdf
PPTX
xml.pptx
PPTX
Unit3wt
PPTX
Unit3wt
PPTX
PPTX
Web Development Course - XML by RSOLUTIONS
PDF
light_xml
PPTX
PPT
xml.ppt
PPT
eXtensible Markup Language (By Dr.Hatem Mohamed)
PPT
PDF
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
PPT
Xml iet 2015
Ch2 neworder
Introduction to xml
XMLin Web development and Applications.pdf
XML for Web Development Information tech.pdf
xml.pptx
Unit3wt
Unit3wt
Web Development Course - XML by RSOLUTIONS
light_xml
xml.ppt
eXtensible Markup Language (By Dr.Hatem Mohamed)
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
Xml iet 2015

More from Sudharsan S (20)

PPT
PPT
Xml plymouth
PPT
PPT
Unix Shell Scripting Basics
PPT
PPT
Introduction to Unix
PDF
PPT
C Lecture
PPT
C Tutorials
PPT
C Introduction
PDF
College1
PDF
C Programming
PDF
C Tutorials
PPT
Preface
PPT
Toc Sg
PPT
PPT
PPT
PPT
PPT
Xml plymouth
Unix Shell Scripting Basics
Introduction to Unix
C Lecture
C Tutorials
C Introduction
College1
C Programming
C Tutorials
Preface
Toc Sg

Recently uploaded (20)

PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Business Ethics Teaching Materials for college
PDF
Classroom Observation Tools for Teachers
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Cell Types and Its function , kingdom of life
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
Pre independence Education in Inndia.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Business Ethics Teaching Materials for college
Classroom Observation Tools for Teachers
102 student loan defaulters named and shamed – Is someone you know on the list?
Cell Types and Its function , kingdom of life
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Microbial diseases, their pathogenesis and prophylaxis
O5-L3 Freight Transport Ops (International) V1.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pharma ospi slides which help in ospi learning
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPH.pptx obstetrics and gynecology in nursing
Supply Chain Operations Speaking Notes -ICLT Program
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Microbial disease of the cardiovascular and lymphatic systems
O7-L3 Supply Chain Operations - ICLT Program
Complications of Minimal Access Surgery at WLH
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Pre independence Education in Inndia.pdf

Xml1111

  • 1. What is XML?  a meta language that allows you to create and format your own document markups  a method for putting structured data into a text file; these files are - easy to read - unambiguous - extensible - platform-independent
  • 2. What is XML?  a family of technologies: - XML 1.0 - Xlink - Xpointer & Xfragments - CSS, XSL, XSLT - DOM - XML Namespaces - XML Schemas
  • 3. XML Facts  officially recommended by W3C since 1998  a simplified form of SGML (Standard Generalized Markup Language)  primarily created by Jon Bosak of Sun Microsystems
  • 4. XML Facts  important because it removes two constraints which were holding back Web developments: 1. dependence on a single, inflexible document type (HTML); 2. the complexity of full SGML, whose syntax allows many powerful but hard-to-program options
  • 5. Quick Comparison  HTML - uses tags and attributes - content and formatting can be placed together <p><font=”Arial”>text</font> - tags and attributes are pre-determined and rigid  XML - uses tags and attributes - content and format are separate; formatting is contained in a stylesheet - allows user to specify what each tag and attribute means
  • 6. Importance of being able to define tags and attributes  document types can be explicitly tailored to an audience  the linking abilities are more powerful - bidirectional and multi-way link - link to a span of text, not just a single point
  • 7. The pieces  there are 3 components for XML content: - the XML document - DTD (Document Type Declaration) - XSL (Extensible Stylesheet Language)  The DTD and XSL do not need to be present in all cases
  • 8. A well-formed XML document  elements have an open and close tag, unless it is an empty element  attribute values are quoted  if a tag is an empty element, it has a closing / before the end of the tag  open and close tags are nested correctly  there are no isolated mark-up characters in the text (i.e. < > & ]]>)  if there is no DTD, all attributes are of type CDATA by default
  • 9. A valid XML document  has an associated DTD and complies with the constraints in the DTD
  • 10. XML basics  <?xml ?> the XML declaration - not required, but typically used - attributes include: version encoding – the character encoding used in the document standalone –if an external DTD is required <?xml version=”1.0” encoding=”UTF-8”> <?xml version=”1.0” standalone=”yes”>
  • 11. XML basics  <!DOCTYPE …> to specify a DTD for the document 2 forms: <!DOCTYPE root-element SYSTEM “URIofDTD”> <!DOCTYPE root-element PUBLIC “name” “URIofDTD”>
  • 12. XML basics  <!-- --> comments - contents are ignored by the processor - cannot come before the XML declaration - cannot appear inside an element tag - may not include double hyphens
  • 13. XML basics  <tag> text </tag> an element - can contain text, other elements or a combination - element name: -must start with a letter or underscore and can have any number of letters, numbers, hyphens, periods, or underscores - case-sensitive; - may not start with xml
  • 14. XML basics Elements (continued)  can be a parent, grandparent, grandchild, ancestor, or descendant  each element tag can be divided into 2 parts – namespace:tag name
  • 15. XML basics  Namespaces: - not mandatory, but useful in giving uniqueness to an element - help avoid element collision - declared using the xmlns:name=value attribute; a URI is recommended for value - can be an attribute of any element; the scope is inside the element’s tags
  • 16. XML basics  Namespaces (continued): - may define more than 1 per element - if no name given after xmlns prefix, uses the default namespace which is applied to all elements in the defining element without their own namespace - can set default namespace to an empty string to ensure no default namespace is in use within an element
  • 17. XML basics  key=”value” an attribute - describes additional information about an element <tag key=”value”> text</tag> - value must always be quoted - key names have same restrictions as element names - reserved attributes are - xml:lang - xml:space
  • 18. XML basics  <tag></tag> OR <tag/> empty element - has no text - used to add nontextual content or to provide additional information to parser  <? ?> processing instruction - for attributes specific to an outside application
  • 19. XML basics  <![CDATA[ ]]> - to define special sections of character data which the processor does not interpret as markup - anything inside is treated as plain text