XML Extensible Markup Language - PowerPoint PPT Presentation

About This Presentation
Title:

XML Extensible Markup Language

Description:

... of a set of element types that have been given certain names & certain meanings. ... names can start with letters (including non-Latin characters) or the ' ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 10
Provided by: hs8146
Learn more at: http://granite.sru.edu
Category:

less

Transcript and Presenter's Notes

Title: XML Extensible Markup Language


1
XML (Extensible Markup Language)
Prepared by Jaclyn Soh
2
XML (Extensible Markup Language)
  • a language for describing structured data.
  • improves on the HTML approach makes the web a
    better place in which to do a business, to learn,
    and to have fun.
  • have a freedom to use pretty much any names you
    like to tag up your data.

3
Example
lt!-- HTML Snippet --gt lth1gtInvoicelt/h1gt ltpgtFrom
Jaclyn Soh ltpgtTo Whoever ltpgtAmount
100.00 ltpgtTax 21 ltpgtTotal Due 121.00 View in
.html
lt!-- XML Snippet --gt ltInvoicegt ltFromgtJaclyn
Sohlt/Fromgt ltTogtWhoeverlt/Togt ltDategtYear2001
month4 day16/gt ltAmount
currency Dollarsgt100.00 lt/Amountgt ltTaxRategt21lt
/TaxRategt ltTotalDue currency Dollarsgt121.00 lt/
TotalDuegt lt/Invoicegt View in .xml from
.xml to .html
4
XML Cont.
  • any language based on XML consists of a set of
    element types that have been given certain names
    certain meanings.
  • the presence of elements of various types in
    documents is indicated by tags that serve to
    indicate where the element starts and ends.
  • a set of element types serves to define types of
    documents and are referred to as Document Type
    Definitions, or DTD.

5
XSL Extensible Stylesheet Language
  • Extensible Stylesheet Language (XSL)
  • relationship between XML and XSL is similar to
    the relationship between HTML and CSS.
  • example

6
More XML
  • strictly hierarchical.
  • can have only one root element.
  • Example ltInvoicegt document, the ltInvoicegt
    element is called root element.
  • root element is the top-level element in the
    document, and all the other elements are its
    children or descendents.

7
XML Generosity???
  • indeed! XML is very generous in the names were
    allowed to use.
  • For example, there arent any reserved words to
    avoid in XML, as there are in most programming
    languages. We have a lot flexibility in this
    regard.
  • However

8
  • Some rules to follows
  • names can start with letters (including
    non-Latin characters) or the _ character, but
    not numbers or other punctuation characters.
  • after the first character, numbers are allowed,
    as are the characters _ and ..
  • names cant contain spaces.
  • names cant contain the character.
  • names cant start with letters xml, in
    uppercase, lowercase, or mixed.
  • there cant be a space after the opening lt
    character the name of the element must come
    immediately after it.
  • case sensitive.
  • For example, ltfirstgt is different from ltFIRSTgt

9
Questions
  • XML is used for describing structural data. (T/F)
  • XML document can have more than one root element.
    (T/F)
  • XML is not case sensitive. (T/F)
  • XML allows you to create your own tags to
    precisely describe data. (T/F)
  • Names can start with letters, characters, numbers
    and punctuation. (T/F)
Write a Comment
User Comments (0)
About PowerShow.com