SlideShare una empresa de Scribd logo
1 de 19
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

Más contenido relacionado

La actualidad más candente (19)

01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Dtd
DtdDtd
Dtd
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
EXtensible Markup Language
EXtensible Markup LanguageEXtensible Markup Language
EXtensible Markup Language
 
Xml
XmlXml
Xml
 
XML
XMLXML
XML
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
DTD
DTDDTD
DTD
 
DTD
DTDDTD
DTD
 
XML
XMLXML
XML
 
Xml basics
Xml basicsXml basics
Xml basics
 
Xml schema
Xml schemaXml schema
Xml schema
 
Building XML Based Applications
Building XML Based ApplicationsBuilding XML Based Applications
Building XML Based Applications
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 

Destacado

Destacado (8)

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
History in HTML
History in HTMLHistory in HTML
History in HTML
 
A Brief History of Web publishing (from HTML to WordPress)
A Brief History of Web publishing (from HTML to WordPress)A Brief History of Web publishing (from HTML to WordPress)
A Brief History of Web publishing (from HTML to WordPress)
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
Web publishing
Web publishingWeb publishing
Web publishing
 
XML - What is XML?
XML - What is XML?XML - What is XML?
XML - What is XML?
 

Similar a Xml1111 (20)

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 and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xml session
Xml sessionXml session
Xml session
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
 
Ch2 neworder
Ch2 neworderCh2 neworder
Ch2 neworder
 
XML
XMLXML
XML
 
Xml11
Xml11Xml11
Xml11
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
Xml
Xml Xml
Xml
 
Xml
XmlXml
Xml
 
XML notes.pptx
XML notes.pptxXML notes.pptx
XML notes.pptx
 
Xml
XmlXml
Xml
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
Xml
XmlXml
Xml
 

Más de Sudharsan S (20)

Xml plymouth
Xml plymouthXml plymouth
Xml plymouth
 
Xml
XmlXml
Xml
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
 
Unix
UnixUnix
Unix
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Unix
UnixUnix
Unix
 
C Lecture
C LectureC Lecture
C Lecture
 
C Tutorials
C TutorialsC Tutorials
C Tutorials
 
C Introduction
C IntroductionC Introduction
C Introduction
 
College1
College1College1
College1
 
C Programming
C ProgrammingC Programming
C Programming
 
C Tutorials
C TutorialsC Tutorials
C Tutorials
 
Preface
PrefacePreface
Preface
 
Toc Sg
Toc SgToc Sg
Toc Sg
 
Les08
Les08Les08
Les08
 
Les06
Les06Les06
Les06
 
Les07
Les07Les07
Les07
 
Les04
Les04Les04
Les04
 
Les05
Les05Les05
Les05
 
Les03
Les03Les03
Les03
 

Último

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 

Último (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 

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