The Extensible Markup Language XML - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

The Extensible Markup Language XML

Description:

It separates the content of the document from its appearance ... Benefits of XML for Publishing. Same XML document can be presented in multiple ways ... – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 33
Provided by: stude1
Category:

less

Transcript and Presenter's Notes

Title: The Extensible Markup Language XML


1
The Extensible Markup Language (XML)
  • By Raghu Garudadri

2
Dont break the seal
3
Agenda
  • What is XML ?
  • Why XML?
  • XML goals
  • Underlying theory
  • DTD/Example DTD/Example XML Document
  • XML Vs. HTML
  • Advantages and Disadvantages of XML over HTML
  • XML application areas
  • Will XML replace HTML
  • References and additional Information
  • Q A

4
What is XML?
  • Extensible Markup Language (XML) is a language
    for documents containing structured information
  • It separates the content of the document from its
    appearance
  • Worldwide Web Consortium (W3C) specification
  • Status recommendation
  • Original version 1996
  • Subset of the Standard Generalized Markup
    Language (SGML)
  • Simpler than SGML
  • More appropriate for the Internet
  • Cousin of the Hypertext Markup Language
    (HTML),goes beyond the current limitations of
    HTML

5
Why XML?
  • HTML, comes bound with a set of semantics and
    does not provide arbitrary structure.
  • SGML provides arbitrary structure, but is too
    difficult to implement just for a web browser
  • XML was created so that richly structured
    documents could be used over the web
  • The only viable alternatives, HTML and SGML, are
    not practical for this purpose.

6
Goals set for XML by the W3C
  • XML shall be straightforwardly usable over the
    Internet
  • XML shall support a wide variety of applications
  • XML shall be compatible with SGML
  • It shall be easy to write programs that process
    XML documents
  • The number of optional features in XML is to be
    kept to the absolute minimal, ideally zero
  • XML documents should be human-legible and
    reasonably clear
  • XML design should be prepared quickly

7
Goals contd..
  • The design of XML should be formal and concise
  • XML documents shall be easy to create
  • Terseness in XML markup is of minimal importance

8
Underlying Theory
  • Terminology commonly used with XML
  • Content
  • Alias character data
  • The documents raw data
  • Structure
  • Description of how the content is organized
  • Within an XML document, structure is indicated by
    tags
  • Presentation
  • Description of how the document should be
    rendered. XML does NOT specify presentation!!!

9
Extensible
  • Set of tags is
  • Not closed
  • "Extensible"
  • Not specified by the XML language
  • Specified by the user via a DTD (Document Type
    Definition)

10
Markup
  • An XML document contains "character data" and
    "markup"
  • Character data
  • The raw data of the document
  • Markup
  • Start tags
  • ltfilmgt
  • lttitlegt
  • End tags
  • lt/ filmgt
  • lt/ titlegt
  • Comments
  • lt!-- This is a comment. --gt
  • Processing instructions (instructions to parser
    or application)
  • lt? xml version "1.0" ?gt
  • Start tags and end tags specify the structure of
    an XML document

11
DTD
  • XML is a metalanguage, it doesnt define actual
    tags
  • DTD (Document Type Definition) defines actual
    tags and structures

12
Example DTD
  • In file film- guide. dtd
  • 1. lt! ELEMENT film- guide (film)gt
  • 2. lt! ELEMENT film (title, run- time, stars)gt
  • 3. lt! ELEMENT title ( PCDATA)gt
  • 4. lt! ELEMENT run- time ( PCDATA)gt
  • 5. lt! ELEMENT stars (name)gt
  • 6. lt! ELEMENT name ( PCDATA)gt
  • Informal description
  • Line 1 A "film- guide" tag contains 0 or more
    "film" tags
  • Line 2 A "film" tag contains a "title" tag,
    followed by a "run- time" tag, followed by a
    "stars" tag
  • Line 3 A "title" tag contains parsed character
    data
  • Line 4 A "run- time" tag contains parsed
    character data
  • Line 5 A "stars" tag contains 0 or more "name"
    tags
  • Line 6 A name tag contains parsed character data

13
Example XML Document
  • In file film- guide. xml
  • 1. lt? xml version" 1.0"?gt
  • 2. lt! DOCTYPE film- guide SYSTEM "film- guide.
    dtd"gt
  • 3. ltfilm- guidegt
  • 4. ltfilmgt
  • 5. lttitlegt Citizen Kanelt/ titlegt
  • 6. ltrun- timegt 119lt/ run- timegt
  • 7. ltstarsgt
  • 8. ltnamegt Joseph Cottonlt/ namegt
  • 9. ltnamegt Orsen Wellslt/ namegt
  • 10. lt/ starsgt
  • 11. lt/ filmgt
  • 12. ltfilmgt
  • 13. lttitlegt The Godfatherlt/ titlegt
  • 14. ltrun- timegt 125lt/ run- timegt
  • 15. ltstarsgt
  • 16. ltnamegt Marlon Brandolt/ namegt
  • 17. ltnamegt Al Pacinolt/ namegt
  • 18. ltnamegt Robert Duvalllt/ namegt

14
XML Vs. HTML
  • Other than both being derived from SGML, XML(a
    subset of SGML)
  • and HTML(written in SGML) are not really
    comparable
  • HTML is optimized for easy learning
  • Has evolved into a markup language that describes
    the look, feel and action of a web page
  • Is for output to a web browser (presentation)
  • One tag set for all applications
  • Predefined semantics for each tag
  • Predefined data structures
  • No formal validations
  • well suited for simple applications
  • In contrary, XML
  • doesnt describe how a page looks, how it acts or
    what it does. XML describes what the words in a
    document are
  • Separates structure and display of data
  • documents are more portable and can be used in
    many demanding applications like
  • Large or complex data collections
  • Data that must be used in different ways
  • Data with a long life cycle
  • Data intended to drive Java applets and other
    programs

15
XML Vs. HTML Contd..
  • 1. ltHTMLgt
  • 2. ltHTMLgt
  • 3. ltTITLEgt Film Guidelt/ TITLEgt
  • 4. ltBODYgt
  • 5. ltH2gt Film Guidelt/ H2gt
  • 6. ltHRgt
  • 7. ltBgt Film lt/ Bgt Citizen Kanelt BRgt
  • 8. ltBgt Running Time lt/ Bgt 119lt BRgt
  • 9. ltBgt Stars lt/ Bgt
  • 10. ltULgt
  • 11. ltLIgt Joseph Cottonlt/ LIgt
  • 12. ltLIgt Orson Wellslt/ LIgt
  • 13. lt/ ULgt
  • 14. ltHRgt
  • 15. ltBgt Film lt/ Bgt The Godfatherlt BRgt
  • 16. ltBgt Running Time lt/ Bgt 125lt BRgt
  • 17. ltBgt Stars lt/ Bgt
  • 18. ltULgt
  • 19. ltLIgt Marlon Brandolt/ LIgt
  • In file film- guide. xml
  • 1. lt? xml version" 1.0"?gt
  • 2. lt! DOCTYPE film- guide SYSTEM "film- guide.
    dtd"gt
  • 3. ltfilm- guidegt
  • 4. ltfilmgt
  • 5. lttitlegt Citizen Kanelt/ titlegt
  • 6. ltrun- timegt 119lt/ run- timegt
  • 7. ltstarsgt
  • 8. ltnamegt Joseph Cottonlt/ namegt
  • 9. ltnamegt Orsen Wellslt/ namegt
  • 10. lt/ starsgt
  • 11. lt/ filmgt
  • 12. ltfilmgt
  • 13. lttitlegt The Godfatherlt/ titlegt
  • 14. ltrun- timegt 125lt/ run- timegt
  • 15. ltstarsgt
  • 16. ltnamegt Marlon Brandolt/ namegt
  • 17. ltnamegt Al Pacinolt/ namegt
  • 18. ltnamegt Robert Duvalllt/ namegt

16
Advantages of XML over HTML
  • Flexibility of defining own markup language will
    help to code documents more precisely
  • Reflects structures and semantics of documents
  • Better searching and navigation
  • Allows single document to be used many ways

17
Disadvantages of XML over HTML
  • More difficult, demanding, and precise than HTML
  • Still in experimental/evolution stages
  • Lack of browser support/end user applications

18
XML Application Areas
  • There are Two primary use of XML
  • Publishing
  • Data Communication

19
XML for Publishing
20
Benefits of XML for Publishing
  • Same XML document can be presented in multiple
    ways
  • Presentation medium is Browser gt
  • present document as HTML
  • Presentation medium is word processor gt
  • present document using word processor format
  • Presentation medium is Braille reader gt
  • present document as raised dots
  • Presentation medium is speech generator gt
  • present document as sound waves
  • Multiple XML documents can be presented in the
    same way
  • Book written by author1 can be presented using
    precisely the same format as books written by
    author2, author3, etc.
  • Newspaper publisher can collect articles from
    disparate sources, and publish them in one
    consistent format

21
XML for Data Communication
22
Benefits of XML for Data Communication
  • Extensible
  • Using a DTD, you define the protocol
  • Simple
  • Easy to understand
  • Tree structured
  • Human readable
  • Easy to debug
  • Standard
  • The mechanism for defining the protocol (DTD) is
    standardized
  • Business communities are defining standard DTDs
    (publishing, pharmaceuticals, financials, etc.)
  • Commercial XML parsers/ generators are readily
    available -- for free!!!

23
XML enables data sharing
  • XML is suitable for exchanging information
  • XML provides structure for data

24
(No Transcript)
25
Business applications of XML
  • Supply chain management connects trading
    partners,suppliers and customers
  • E-commerce applications enables automation and
    integration of backend databases, ERP systems,
    etc., and facilitates presentation of XML data as
    html vis XSL(Extensible Stylesheet Language)
  • EDI translation of EDI documents to XML allows
    for new B2B applications and broadens the supply
    chain
  • ERP allows access to business logic and data
    embedded in ERP systems
  • Legacy system integration exposes legacy data
    to web applications

26
XML in Web browsers
  • XML is going to be an integral part of the web
  • Microsoft jumped in quickly and implemented XML,
    IE5 and above supports XML
  • Netscape was late, but it is trying to catch up.

27
Importance of XML
  • Next generation web architecture
  • Provides means to solve data interchange problems
  • Standards based
  • Has wide spread industry support
  • Based on SGML experience

28
What problems does XML solve?
  • Multiple output formats
  • Information exchange between software systems
  • Long term format for information archives

29
Will XML replace HTML?
  • The Answer is NO.
  • XML will coexist with HTML
  • XML does not specify the format or appearance of
    a document.
  • An emerging standard XSL (Extensible Stylesheet
    Language) specifies the appearance of a document.
    You can think of XSL translating XML into HTML
    for display.
  • XML is a good viable alternative for high-end
    publishing on the web but it is not a replacement
    for HTML

30
References and additional Information
  • URLs
  • XML Standards
  • http//www.w3.org/XML - the core site for the XML
    standards body
  • XML Forums and Information hubs
  • http//www.xml.com - an excellent site for XML
    information, sponsored by Seybold
  • http//www.xmlinfo.com - general XML resources
    site
  • http//xmlrepository.com - general XML resource
    site
  • http//www.geocities.com/WallStreet/Floor/5815 -
    the XML/EDI group
  • http//www.infotek.no/sgmltool/guide.htm - XML
    and SGML products and companies
  • http//www.ucc.ie/xml - XML FAQ maintained by key
    people in XML standards groups
  • http//www.geocities.com/SiliconValley/Peaks/5957/
    xml.html - a small XML info site
  • http//www.xmlx.com - commerce Nets XML
    Exchange.
  • http//www.csclub.uwaterloo.ca/u/relander/XML -
    general XML information
  • http//www.oasis-open.org/cover/xml.html - OASIS
    XML cover pages
  • http//ala.vsms.nottingham.ac.uk/vsms/java -
    On-line course covering Java and XML
  • http//www.jclark.com/xml - James Clarks XML
    resources
  • http//www.sil.org/sgml - Brian Covers SGML/XML
    page
  • http//www.geocities.com/SiliconValley/Peaks/5957/
    xml.html - general XML information
  • http//www.simonstl.com - general XML information

31
(No Transcript)
32
Conclusion
  • The extensible markup language (XML) has been
    referenced
  • as the universal duct tape for all the software
    integration problems,
  • it is quickly becoming a accepted industry
    standard. Almost any
  • platform can Manipulate XML allowing companies to
    build
  • business-to-business systems with out vendor
    lock-in and with the
  • Infrastructure they already have. Lets hope XML
    will enable
  • competitive but coordinated markets
Write a Comment
User Comments (0)
About PowerShow.com