home

Chapter 12:Creating and Using XML Documents


Chapter 1 | Chapter 2 | Chapter 3 | Chapter 4 | Chapter 5 | Chapter 6
Chapter 7 | Chapter 8 | Chapter 9 | Chapter 10 | Chapter 11 | Chapter 12


Data Island:
A set of data elements separate from the main HTML Webpage.
Extensible Markup Language (XML):
Standardized language developed by W3C that uses tags to describe the structure of a document and its content, not just the format for display as with an HTML document.
Extensible Stylesheet Language (XSL):
Language used to create style sheets for formatting structured XML data.
Well Formed:
An XML docments is well formed when it adheres to the basic syntax rules for XML.
Parser:
An XML Processor that verifies that the document follows the syntax rules for a well-formed document and converts the document into a tree of elements.
Prolog:
Contains the processing instruction statements, any additional comments necessary to provide information about the document's content and structure, and the optional Document Type Definition (DTD) Statements.
Document Instance:
Contains the main content or elements of the XML document.
Processing Instruction:
One or more instructions passed to the application using the XML document.
XML Declaration:
A processing instruction statement identifying the version of XML used in the document.
Document type Declaration:
A processing instruction that tells the processor where the locate the Document Type Definition.
Document Type Definition (DTD):
Defines the elements and attributes in an XML document.
Valid:
An XML Document is valid when it conforms to the specified structure in the DTD.
Instance:
An occurrence of XML elements.
Root Element:
The main element is the Root element and may contain one or more sub- or child elements.
XML Declaration:
A processing instruction in the prolog that provides additional information to the application that will process the XML Document.
Namespace:
A unique identifier or prefix used to identify tags that have the same name.
Style Sheet Element:
Establishes a namespace, so the remaining elements, such as the template, can use names that will not be confused with other elements.
Template:
An instruction that identifies the elements in a document that should be transformed or converted when displaying a particular element in the XML Document.
Data Binding:
The process of mapping XML elements to a data format that preserves the hierarchy of the data and allows the data to be manipulated using different methods.
Data Source Object (DSO):
Unique name that represents the data island in the XML element.
EOF:
Signals that all XML document records have been read.


Other Notes

  1. HTML and XML are both subsets of the Standard Generalized Markup Language (SGML).
  2. XML is not limited to just use in web databases
  3. Every XML document must have a declaration statement in the prolog.
    <?xml version="1.0"?>
  4. The name that a developer provides for the tags is called the Generic Identifier (GI).
  5. XML is essentially used to store web data. In modern web design this often includes user comments and functions.


XML Syntax Rules
Rules Comment Example
XML is case-sensitive Use any case- uppercase, lowercase, or mixed- but be consistent. Correct: <Root></Root>
<root></root>
<ROOT></ROOT>
Incorrect:<Root></ROOT>
All tags must have a closing tag All tags, including empty tags, must have a closing tag. Empty tags are allowed a special form. Empty tags have no content, such as <br> and <img> tags. <p>This is a paragraph</p>
<name>Susan</name>
<br />
All documents must have a root element Include the root or start tag that begins a document.
<root>
  <child></child>
</root>
Elements must be nexted Elements cannot stand alone unless they are the only root element.
<club>
  <name>Spanish</name>
</club>
Attribute values must be enclosed in quotation marks Use single or double quotation marks, but be consistent. <image picture="icon.jpg" />
With XML, white space is preserved Spaces between words within tags are preserved. No need for ASCii characters (&nbsp;) to add spaces.



XML Example
Title Genre Director Rating Date
  





Source Code:
Chapter 1 | Chapter 2 | Chapter 3 | Chapter 4 | Chapter 5 | Chapter 6
Chapter 7 | Chapter 8 | Chapter 9 | Chapter 10 | Chapter 11 | Chapter 12

top |< back

Valid XHTML 1.0 Transitional