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
Ad

More Related Content

What's hot (20)

Xhtml
XhtmlXhtml
Xhtml
Manav Prasad
 
3 xml namespaces and xml schema
3   xml namespaces and xml schema3   xml namespaces and xml schema
3 xml namespaces and xml schema
gauravashq
 
Xml presentation
Xml presentationXml presentation
Xml presentation
Miguel Angel Teheran Garcia
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Jussi Pohjolainen
 
Xpath presentation
Xpath presentationXpath presentation
Xpath presentation
Alfonso Gabriel López Ceballos
 
XML
XMLXML
XML
Vahideh Zarea Gavgani
 
XSD
XSDXSD
XSD
Kunal Gaind
 
XML
XMLXML
XML
Avanitrambadiya
 
Xml
Xml Xml
Xml
Neeta Sawant
 
Dtd
DtdDtd
Dtd
Manish Chaurasia
 
XML
XMLXML
XML
Mukesh Tekwani
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
Gtu Booker
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
Hend Al-Khalifa
 
XSLT
XSLTXSLT
XSLT
Kamal Acharya
 
Xml dtd
Xml dtdXml dtd
Xml dtd
sana mateen
 
DTD
DTDDTD
DTD
Kamal Acharya
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Fazli Kabashi
 
Js ppt
Js pptJs ppt
Js ppt
Rakhi Thota
 
Dom
Dom Dom
Dom
Surinder Kaur
 
Xml
Xml Xml
Xml
Shailendra Gohil
 

Viewers also liked (20)

XML.ppt
XML.pptXML.ppt
XML.ppt
butest
 
Xml
XmlXml
Xml
Abhishek Kesharwani
 
XML - What is XML?
XML - What is XML?XML - What is XML?
XML - What is XML?
sandur
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
Sudharsan S
 
Xml
XmlXml
Xml
Santosh Pandey
 
Xml schema
Xml schemaXml schema
Xml schema
Akshaya Akshaya
 
Xml schema
Xml schemaXml schema
Xml schema
Harry Potter
 
Querying rich text with XQuery
Querying rich text with XQueryQuerying rich text with XQuery
Querying rich text with XQuery
lucenerevolution
 
Xml & Java
Xml & JavaXml & Java
Xml & Java
Slim Ouertani
 
Xml1111
Xml1111Xml1111
Xml1111
Sudharsan S
 
Tema 2
Tema 2Tema 2
Tema 2
avalver2
 
Querying XML: XPath and XQuery
Querying XML: XPath and XQueryQuerying XML: XPath and XQuery
Querying XML: XPath and XQuery
Katrien Verbert
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Marco Bresciani
 
History in HTML
History in HTMLHistory in HTML
History in HTML
Chris Cantwell
 
SQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML DataSQL Server - Querying and Managing XML Data
SQL Server - Querying and Managing XML Data
Marek Maśko
 
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)
Brian Duffy
 
Entity beans in java
Entity beans in javaEntity beans in java
Entity beans in java
Acp Jamod
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
Return on Intelligence
 
XML and DTD
XML and DTDXML and DTD
XML and DTD
Jussi Pohjolainen
 
Ad

Similar to Xml Presentation-3 (20)

EXtensible Markup Language
EXtensible Markup LanguageEXtensible Markup Language
EXtensible Markup Language
Prabhat gangwar
 
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
Dr.Florence Dayana
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
manochitra10
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
Swati Parmar
 
Xml 1
Xml 1Xml 1
Xml 1
pavishkumarsingh
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
Luqman Shareef
 
Xml session
Xml sessionXml session
Xml session
Farag Zakaria
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
Dr.Saranya K.G
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
ssuser21721b
 
Ch2 neworder
Ch2 neworderCh2 neworder
Ch2 neworder
davidlahr32
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
Baskarkncet
 
XML
XMLXML
XML
Alex Clooney
 
Xml11
Xml11Xml11
Xml11
Sudharsan S
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
xavier john
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
UdayKumar693239
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
Pradeep Rapolu
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
Alfonso Gabriel López Ceballos
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
vamsi krishna
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
vamsitricks
 
Xml
XmlXml
Xml
soumya
 
Ad

More from Sudharsan S (20)

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

Xml Presentation-3

  • 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