Introduction to XML

by K. Yue

1. Introduction

Example:

<?xml version="1.0"?>
<memo priority="very high">
<from empId='1012345'>Bun Yue</from>
<to>Everybody</to>
<body>
Hello, welcome!
</body>
</memo>

 

Some Advantages of XML:

  1. Strict syntax with unambiguous structures for simpler and more meaningful processing.
  2. Better modeling of application domain.
  3. Validation for early error checking.
  4. Extensible to fit requirements of different domains.
  5. Human readable and easy to understand.
  6. Vigorous standards and wide adoption.
  7. Abundance of tools.

Some disadvantages of XML:

  1. Verbose
  2. Text-based
  3. Tree-based structures may not fit specific application natures.
  4. Not object-oriented

Example:

The popular JSON (JavaScript Object Notation) uses a name-value pair notation, not XML.

Core XML Standards

See http://www.w3.org/XML/.

  1. XML Specification: XML syntax.
  2. XML Namespace: defining address spaces to avoid naming conflicts.
  3. DTD (Document Type Definition): an old standard for specifying grammars of XML vocabularies.
  4. XML Schema: a newer and much more powerful way to define XML grammars that is itself in XML format.
  5. XLink: linking between XML documents.
  6. XPointer: referring to parts of an XML document.
  7. XPath: searching an XML document.
  8. XQuery: XML query language in the line of SQL.
  9. CSS (Cascading Stylesheet): a style sheet standard for viewing XML and HTML.
  10. XSL (eXtensible Stylesheet Language): for displaying and transforming XML documents
    1. XSLT: the XSL part for XML transformation.
    2. FO: formatting object, the display part of XSL.
  11. DOM (Document Object Model): W3C standard for object and interface collections for manipulating XML documents (and HTML, etc).

XML Tools and Technology

XML DB