01 - XML - Introduction to XML

download 01 - XML - Introduction to XML

of 100

Transcript of 01 - XML - Introduction to XML

  • 8/3/2019 01 - XML - Introduction to XML

    1/100

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    eXtensible Markup Language

    Foundation, Technologies & Applications

    eXtensible Markup Language Phan Vo Minh Thang

  • 8/3/2019 01 - XML - Introduction to XML

    2/100

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML is an Acronym standing for:eXtensible Markup Language

    XML is fast becoming the new Internet

    standard for information exchange. Forcomplex information reuse, XML is the

    technology of choice

  • 8/3/2019 01 - XML - Introduction to XML

    3/100

    3

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    4/1004

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    5/1005

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML Lectures Notes Introduction to XML

  • 8/3/2019 01 - XML - Introduction to XML

    6/1006

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML Lectures Notes Introduction to XML

  • 8/3/2019 01 - XML - Introduction to XML

    7/1007

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML Lectures Notes Introduction to XML

  • 8/3/2019 01 - XML - Introduction to XML

    8/100

    8

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    9/100

    9

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    10/100

    10

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    < e s o 0 > < ate a > ectu es otes t oduct o to

    Why use XML?

    It is a universally accepted standard way ofstructuring data (syntax).

    It is a W3C recommendation (W3C = World WideWeb Consortium)

    The marketplace supports it with a lot of

    free/inexpensive tools.

    The alternative to using XML is to define your own

    proprietary data syntax, and then build your ownproprietary tools to support the proprietary syntax(Not a very appealing idea).

  • 8/3/2019 01 - XML - Introduction to XML

    11/100

    11

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Alphabet Soup

    Whats with all the different markup languages? SGML

    HTML XML

    XHTML

  • 8/3/2019 01 - XML - Introduction to XML

    12/100

    12

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A Brief History of XML

    First SGML (Standard Generalized Markup Language) The grandfather of all markup languages

    An ISO standard for markup of text, Adopted in1986

    SGML describes the logical structure of a document, its components,and their relationship to each other, not how the document should beformatted (Separates content from presentation and format)

    Conform to a formal model DTD (Data Type Definition)Documents are regarded as having types defined by DTD

    Disadvantages of SGML

    Comprehensive but very complex and is difficult to learn and apply.SGML tools have traditionally been very expensive.

    SGML has been primarily a technology for print publishing

    Developed at IBM by Goldfarb, Mosher & Lorie in 1969

  • 8/3/2019 01 - XML - Introduction to XML

    13/100

    13

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A Brief History of XML (Cont.)

    Then HTML, language of Web an simplified applicationof SGML

    HTML is a fixed tag set. You cannot add your own tags to HTML.

    HTML is designed for display (in Web browser). It is not effectivefor print or other formats.

    HTML is static. Its display is fixed, so providing information in

    different ways based on user request is difficult. HTML is not structural (with the exception of lists and tables). It's

    primarily a linear presentation markup

    HTML is not really a standard. Browser vendors have created theirown proprietary codes, which impedes standardization

  • 8/3/2019 01 - XML - Introduction to XML

    14/100

  • 8/3/2019 01 - XML - Introduction to XML

    15/100

  • 8/3/2019 01 - XML - Introduction to XML

    16/100

  • 8/3/2019 01 - XML - Introduction to XML

    17/100

    17

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Design Goals of XML

    XML will be designed for use on the Internet, but shallsupport a wide variety of applications (such as Web-basedpublishing and e-commerce)

    XML will be based on and compatible with SGML XML keeps the best of SGML and reduces the complexity

    It will be easy to write programs that processes XML

    documents XML documents will be easy to create, readable without

    specialized tools, and reasonably clear

    XML is in ASCII (or text) format

    The design of XML will be formal and concise

    XML is a precise standard

  • 8/3/2019 01 - XML - Introduction to XML

    18/100

  • 8/3/2019 01 - XML - Introduction to XML

    19/100

  • 8/3/2019 01 - XML - Introduction to XML

    20/100

    20

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    HTML has limited structure

    Restricted to a fixed set of tags Isnt extensible for specific applications

    Presents barriers for Reuse in multiple formats

    Interchange between applications or programs Automation or ability to process programmatically

  • 8/3/2019 01 - XML - Introduction to XML

    21/100

    21

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Revert to using SGML?

    SGML overcomes HTMLs drawbacks Information model of freedom and extensibility

    Write once, reuse many times

    Future-proof, platform-proof

    Validation for completeness and correctness

    Infinite possibilities for expressing information (infinite tag set)

    SGML has its problems:

    Its complex and difficult to learn and use

    Theres no mainstream browser support

    Plus SGML only standardizes structure

    Includes no support for styles

  • 8/3/2019 01 - XML - Introduction to XML

    22/100

    22

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML to the Rescue

    XML was invented in 1997 to enable the delivery of SGMLinformation over the Web

    Well-behaved subset of SGML

    Stricter rules drive consistency

    Enables machine-to-machine communications

    SGML --, not HTML ++ Retains the power and flexibility of SGML without the complexity

    A World Wide Web Consortium (W3C) standard

    Has overwhelming vendor support

  • 8/3/2019 01 - XML - Introduction to XML

    23/100

    23

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    W3C is responsible for the development of Webspecifications (recommendations) that describecommunication protocols and the technologies for theWeb.

    Role of W3C in defining XML related specifications

    W3C has laid down certain rules that need to be followed by allXML applications. Listed below are some of these rules:

    XML must be directly usable over the Internet.

    XML must support a wide variety of applications.

    XML must be compatible with SGML.

    Offical website is at http://www.w3c.org

    Introduction to World Wide Web Consortium

  • 8/3/2019 01 - XML - Introduction to XML

    24/100

    24

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Introduction to World Wide Web Consortium (Contd.)

    The number of optional features in XML needs to be keptto the absolute minimum, ideally zero.

    XML documents must be human-legible and clear.

    XML design must be formal and concise.

  • 8/3/2019 01 - XML - Introduction to XML

    25/100

    25

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML Specification

    XML 1.0 specification released By W3C consortium on Feb. 10, 1998

    As a recommendation - the highest level ofendorsement possible

    Cross-platform, vendor neutral standard

    Developed by XML Working Group

    Many vertical industry initiatives

  • 8/3/2019 01 - XML - Introduction to XML

    26/100

    26

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML working group

    Consists of 14 companies and organizations Adobe, ArborText, DataChannel, FujiXerox, HP, Inso,

    Isogen, Microsoft, Netscape, SoftQuad, Sun

    Microsystems, University of Chicago

    Along with a W3C representative and James Clark

    Yes, Sun and Microsoft can work together!

  • 8/3/2019 01 - XML - Introduction to XML

    27/100

    27

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML 1.0 spec has 2 parts

    One for XML documents How to use tagged markupto indicate the meaning of

    data

    One for XML Document Type Definitions (DTDs)

    How to indicate the allowable structure for a class of

    XML documents

    Can constrain the pieces of data that might occur, thehierarchy of data and the number of times each piece

    of data might occur

  • 8/3/2019 01 - XML - Introduction to XML

    28/100

    28

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Summary: XML Advantages

    Over SGML Faster download

    Supported bymainstream browsers

    Standard linking

    Standard stylesheet

    Over HTML Interchangeable

    Reusable Enables automation

    Searchable

  • 8/3/2019 01 - XML - Introduction to XML

    29/100

    29

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    What about XHTML?

    EXtensible HyperText Markup Language An XML application

    Stricter and cleaner version of HTML Almost identical to HTML 4.01

    Is aimed to replace HTML

    Better support for multimedia, wireless devices

    An official W3C Recommendation - January 26, 2000

  • 8/3/2019 01 - XML - Introduction to XML

    30/100

    30

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Using XHTML

    Some dont recommend XHTML because You have all the pain of XML without any of the gain

    Markup is still structural and presentational

    But, your pages can be validated

    And work without a hitch (or youll receive errormessages)

    Theres a tool to convert HTML to XHTML

    HTMLTidy www.w3.org/People/Raggett/tidy/

  • 8/3/2019 01 - XML - Introduction to XML

    31/100

    31

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Exercise A

    1. Metadata is information about information2. XML is a programming language

    3. XML assumes that a document is structuredhierarchically

    4. XML is platform and language independent

    5. You can use any text editor to create XMLdocuments

    6. XHTML lets you define your own tags

    TRUE

    FALSE

    TRUE

    TRUE

    TRUE

    FALSE

  • 8/3/2019 01 - XML - Introduction to XML

    32/100

    32

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Exercise A (continued)

    7. XML content can be in any language of the world8. Internet Explorer 5 and Netscape 6 support XML

    9. XML is about adding procedural markup code todocuments

    10.XML provides 50% of the capabilities of SGML

    11.XML is a good solution to achieve dataindependence

    12.A parser checks to see if your markup tags arespelled correctly

    TRUE

    TRUE

    FALSE

    FALSE

    TRUE

    FALSE

  • 8/3/2019 01 - XML - Introduction to XML

    33/100

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A Look at XML

  • 8/3/2019 01 - XML - Introduction to XML

    34/100

    34

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A Sample HTML Document

    Sample HTML document For pure display, HTML is very effective

    Simple code, workable output, clear delineation of content elements

    and their nesting by tags

    HTML is a good example of a simple markup language

    There are start tags and end tags ()

    The end tag is differentiated from the start tag by the forward slash

    The procedure file shows nesting of the elements of the document

    HTML is concerned solely with presentation It does nothing to help you understand what the information is

    Need interpret the content, not through the HTML tags

  • 8/3/2019 01 - XML - Introduction to XML

    35/100

    35

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A Sample HTML Document Illustration

  • 8/3/2019 01 - XML - Introduction to XML

    36/100

  • 8/3/2019 01 - XML - Introduction to XML

    37/100

  • 8/3/2019 01 - XML - Introduction to XML

    38/100

    38

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    g g

    Tag names have meaning for you and your authors

    Names can reflect the content

    Tag names have nothing to do with formatting

    Formatting can be defined later, when you know the exactpurposes of the document. Nothing in the markup will limit theformats to which you can output

    You can have as many or as few tags as you need

  • 8/3/2019 01 - XML - Introduction to XML

    39/100

  • 8/3/2019 01 - XML - Introduction to XML

    40/100

  • 8/3/2019 01 - XML - Introduction to XML

    41/100

  • 8/3/2019 01 - XML - Introduction to XML

    42/100

  • 8/3/2019 01 - XML - Introduction to XML

    43/100

  • 8/3/2019 01 - XML - Introduction to XML

    44/100

  • 8/3/2019 01 - XML - Introduction to XML

    45/100

  • 8/3/2019 01 - XML - Introduction to XML

    46/100

    46

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A document includes

    Structure

    Content

    Display (presentation)

    HTML: define structure and display

    XML: only define structure But it relies on special browsers and/or XSL for displaying it

  • 8/3/2019 01 - XML - Introduction to XML

    47/100

  • 8/3/2019 01 - XML - Introduction to XML

    48/100

    48

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XSL

    XML

    Document

    Schema

    Language

    Documents with

    Special Format

    (HTML, WML)

    Structure

    Display

    Processing

    Conte

    nt

    XMLPa

    rser

  • 8/3/2019 01 - XML - Introduction to XML

    49/100

  • 8/3/2019 01 - XML - Introduction to XML

    50/100

    50

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XPath is a querying language for addressingparts of an XML document

    XLinkand

    XPointer are languages used to linkXML documents to each other

    Xlink describes how to associate two or more resources

    XPointer describes how to address a resource

    SAX (simple API for XML) is a simple Java

    interface

  • 8/3/2019 01 - XML - Introduction to XML

    51/100

    51

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Doc um ent Objec t Model (DOM)

    is an application programming interface (API)for HTML and XML documents

    Allows for content to be accessed andmanipulated even AFTER it has become part of

    an HTML or XML document

    Published as a Recommendation by W3C

  • 8/3/2019 01 - XML - Introduction to XML

    52/100

  • 8/3/2019 01 - XML - Introduction to XML

    53/100

    53

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML Browser

    View and print XML documents

    Microsoft Internet Explorer

    XML Editor

    Microsoft XML notepad

    XML Parser Shield programmers from the XML syntax

    IBMs XML for Java

    XSL Processor

    Transform XML to HTML

    LotusXSL

  • 8/3/2019 01 - XML - Introduction to XML

    54/100

  • 8/3/2019 01 - XML - Introduction to XML

    55/100

  • 8/3/2019 01 - XML - Introduction to XML

    56/100

  • 8/3/2019 01 - XML - Introduction to XML

    57/100

  • 8/3/2019 01 - XML - Introduction to XML

    58/100

    58

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    59/100

    59

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    60/100

  • 8/3/2019 01 - XML - Introduction to XML

    61/100

  • 8/3/2019 01 - XML - Introduction to XML

    62/100

    62

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    63/100

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Characteristics of XML

  • 8/3/2019 01 - XML - Introduction to XML

    64/100

    64

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Book chapter title -- section summary

    When you examine similar information product, structuresare not consistent from product to product

    Big problem for reuse

    In XML, structure can be defined in a Document TypeDefinition (DTD) or Schema. DTD

    Defines all the elements (XML tags) that can be used in adocument.

    Defines the relationship of those elements to other elements

    Define the hierarchy of elements ("a chapter contains"), theorder of elements, the number of elements

    Maintain structural consistency

  • 8/3/2019 01 - XML - Introduction to XML

    65/100

  • 8/3/2019 01 - XML - Introduction to XML

    66/100

    66

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    67/100

    67

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML is a set of rules for creating markup tags

    The tag names themselves offer additional detail about theinformation.

    The tag names become metadata Attributes can be used to further define metadata

    Example

    Using attributes identifies the audience for each specific step,option, or even word

  • 8/3/2019 01 - XML - Introduction to XML

    68/100

    68

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    69/100

    69

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML makes you look at information in the way of data

    XML DTD designers are not interested in the actual datavalues in design. They are concerned with the type ofinformation, the hierarchy of information, and therelationship of the pieces of information

    The result is a structural format that can be stored very easily inDB

    Each element can become a field of a table

  • 8/3/2019 01 - XML - Introduction to XML

    70/100

    70

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    How to format XML information for presentation?

    XSL is a powerful mechanism for both transforming andformatting XML documents

    XSL is an XML markup language itself and can

    Format content for online display or for paper-based delivery

    Add constant text or graphics

    Filter content

    Sort or reorder text

    Three parts of XSL

    XPath

    XSL transformations

    XSL-FO (formatting objects)

  • 8/3/2019 01 - XML - Introduction to XML

    71/100

    71

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XPath identify and format specific elements in an XML

    doc

    Can specify and apply specific formatting or transformation toelements, such as a title following a chapter, the first paragraph in

    a section, and every other bullet in a list

    XSLT

    Can manipulate the information to reorder, repeat, filter outinformation, or even add information based on details in the file

    Can transform an XML document into another markup language

    XSL-FO Provide style sheet capabilities for converting XML to paper-based

    format such as PDF

    Include page layouts, headers, footers

  • 8/3/2019 01 - XML - Introduction to XML

    72/100

  • 8/3/2019 01 - XML - Introduction to XML

    73/100

    73

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Personalization is information that can be manipulated to

    serve the needs of a specific user

    Personalization can be user defined, or can managed bysoftware, based on a user's login information

    Personalization that is managed by software may becontrolled by observing user behavior, and/or combined

    with preferences to create a personalized experience With XML, documents can be broken down, stored as

    separate physical pieces in a database, and then

    assembled in any order to meet user demands

  • 8/3/2019 01 - XML - Introduction to XML

    74/100

    74

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Phn ni dung tiu

    Ni dung bn trong phn thn


    ca mt ti liu HTML

    pages are predefined

    Element

    Attribute

    Text

  • 8/3/2019 01 - XML - Introduction to XML

    75/100

  • 8/3/2019 01 - XML - Introduction to XML

    76/100

    76

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Phn ni dung tiu

    Ni dung bn trong phn thn

    ca mt element XML

    by users

    Element

    Attribute

    Text

  • 8/3/2019 01 - XML - Introduction to XML

    77/100

  • 8/3/2019 01 - XML - Introduction to XML

    78/100

  • 8/3/2019 01 - XML - Introduction to XML

    79/100

    79

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    about the products sold through its e-commerce site. It hasthree branches, which maintain data on their localcomputer systems. Data from all the three branches must

    be collated and housed in a centralized location. This datamust be made available to the Accounts and Salessections of these branches, regardless of the hardware

    and software platforms being used at the branches. Thesales personnel also require access to the data usingequipment, such as palmtops and cellular phones.

  • 8/3/2019 01 - XML - Introduction to XML

    80/100

    80

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    of the product, a brief description of the product, the price,and the available quantity on hand. Each product isuniquely identified by a product ID.

  • 8/3/2019 01 - XML - Introduction to XML

    81/100

    81

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    format.

    Identify the structure of the document in which data is tobe stored.

    Create an XML document to store data.

    View the XML document in a browser.

  • 8/3/2019 01 - XML - Introduction to XML

    82/100

    82

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    XML provides a way to store structured data that iscapable of being recognized by different kinds of devices.In other words, it enables device-independence.

  • 8/3/2019 01 - XML - Introduction to XML

    83/100

    83

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    organize it. An XML document is composed of a number of

    components that can be used for representing information.

    These components are: Processing Instruction

    An XML document usually begins with the XML declaration statement

    or the Processing Instruction (PI). The PI provides information regarding the way in which the XML file

    should be processed.

  • 8/3/2019 01 - XML - Introduction to XML

    84/100

  • 8/3/2019 01 - XML - Introduction to XML

    85/100

    85

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Tagsare used to specify a name for a given piece ofinformation.

    Tags usually occur in pairs.

    Each pair consists of a start tag and an end tag.

    The start tag only contains the name of the tag whilethe end tag includes a forward slash (/) before thename of the tag.

  • 8/3/2019 01 - XML - Introduction to XML

    86/100

    86

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Elements are the basic units that are used to identifyand describe data in XML.

    They are the building blocks of an XML document.

    Elements are represented using tags.

    An XML document must always have a root element.All other elements are specified within the opening andclosing tags of the root element.

  • 8/3/2019 01 - XML - Introduction to XML

    87/100

  • 8/3/2019 01 - XML - Introduction to XML

    88/100

    88

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    A parent element can contain many child elements.

    All the child elements of a parent element are siblings and arethus related to one another.

    Combination

    Elements can contain textual information as well as otherelements.

  • 8/3/2019 01 - XML - Introduction to XML

    89/100

  • 8/3/2019 01 - XML - Introduction to XML

    90/100

    90

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    While deciding whether to represent information as an element oran attribute, you can follow the guidelines given below:

    If the data must be displayed, you can represent it as an element. In

    general, element attributes are used for intangible, abstract propertiessuch as ID.

    If the data must be updated frequently, it is better represented as anelement because it is easier to edit elements than attributes with XML

    editing tools.

    If the value of a piece of information must be checked frequently, itmay be represented as an attribute.

  • 8/3/2019 01 - XML - Introduction to XML

    91/100

    91

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    An entity can be described as a short cut to a set of information.

    It is a name that is associated with a block of data.

    This data can be a chunk of text or a reference to an external filethat contains textual or binary information.

    XML supports the use of three kinds of entities: internal, general,and parameter entities.

  • 8/3/2019 01 - XML - Introduction to XML

    92/100

    92

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    An internal entity consists of a name that is associated with a blockof information.

    This can be identified easily as it is always preceded by an

    ampersand (&) symbol and terminated with a semicolon.

  • 8/3/2019 01 - XML - Introduction to XML

    93/100

  • 8/3/2019 01 - XML - Introduction to XML

    94/100

    94

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Structure of the XML document to be used for storingproducts data:

    PRODUCTPRODUCT

    PRODUCTNAMEPRODUCTNAME

    DESCRIPTIONDESCRIPTION

    PRICEPRICE

    QUANTITYQUANTITY

    PRODUCTDATAPRODUCTDATA

  • 8/3/2019 01 - XML - Introduction to XML

    95/100

  • 8/3/2019 01 - XML - Introduction to XML

    96/100

    96

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

  • 8/3/2019 01 - XML - Introduction to XML

    97/100

  • 8/3/2019 01 - XML - Introduction to XML

    98/100

    98

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Processing Instructions

    Elements

    Attributes Entities

    Comments

    Content

  • 8/3/2019 01 - XML - Introduction to XML

    99/100

    99

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    document are as follows: Every start tag must have an end tag.

    Empty tags must be closed using a forward slash (/).

    All attribute values must be given in double quotation marks.

    Tags must nest correctly.

    XML tags are case-sensitive. They must match each other in everyimplementation.

  • 8/3/2019 01 - XML - Introduction to XML

    100/100

    100

    eXtensible Markup LanguageLectu rer : Phan Vo Minh Than g MSc.

    Special Selected Topic in

    Information System Section: Introduction to XML

    Number of slides: 100

    Updated date: 12/02/2006

    Contact: Mr.Phan Vo Minh Thang

    ([email protected])