Extensible Markup Language

From Citizendium
Revision as of 09:51, 19 May 2007 by imported>Paul Derry (→‎Grammar and Definitions)
Jump to navigation Jump to search

eXtensible Markup Language (XML) is a W3C markup language derived from SGML (ISO8879-1986) used in a wide variety of applications for the storage and representation of textual data in a consistent, hierarchical, and well-formed structure.[1]

XML Specification and Origin

The XML specification was developed in 1996 by the SGML Editorial Review Board chaired by John Bosak of Sun Microsystems and the XML Special Interest Group in an attempt to create a subset of the Standard Generalized Markup Language. The group, also known as the XML Working Group laid out a set of guidelines that defined the design goals of the markup language, these requirements are intended to make XML into a straightforward, consistent and portable mark up language:

  1. XML shall be straightforwardly usable over the Internet.
  2. XML shall support a wide variety of applications.
  3. XML shall be compatible with SGML.
  4. It shall be easy to write programs which process XML documents.
  5. The number of optional features in XML is to be kept to the absolute minimum, ideally zero.
  6. XML documents should be human-legible and reasonably clear.
  7. The XML design should be prepared quickly.
  8. The design of XML shall be formal and concise.
  9. XML documents shall be easy to create.
  10. Terseness in XML markup is of minimal importance.

[2]


Grammar and Definitions

This section contains a brief over view of the components that define XML, for a more in-depth examination of those components read the individual sections under the heading Structure


Prolog - A prolog is a sort of 'announcement' to the XML parser as to what version the following set of XML objects is written in. The prolog also contains other information pertinent to the XML document (discussed later.)

Tag - A tag denotes the beginning, end, or existence of an XML object.

Example

<class> <-- Start Tag
    <var /> <-- Single Tag
</class> <-- End Tag

Start Tags never have a forward slash / in them. End Tags always have a forward slash before the name of the tag. Single tags always have a forward slash after a space after the name of the tag.

Element - An element is an XML object composed of a start tag and a stop tag or a single tag.

Example

<?xml version="1.0" standalone="no"?>
<root-element>
    <child-element>
        ...
        <singular-element />
        ...
    </child-element>
</root-element>

Document - A document is any XML object that contains a prolog and one or more elements excluding the root element.

Structure

Tags

Elements
Attributes

References

  1. Bray, Tim, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, and François Yergeau, eds. "Extensible Markup Language (XML) 1.0 (Fourth Edition)." World Wide Web Consortium Recommendations. 29 Sept. 2006. 18 May 2007 <http://www.w3.org/TR/2006/REC-xml-20060816/#sec-intro>.
  2. Bray, Tim, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, and François Yergeau, eds. "Extensible Markup Language (XML) 1.0 (Fourth Edition)." World Wide Web Consortium Recommendations. 29 Sept. 2006. 18 May 2007 <http://www.w3.org/TR/2006/REC-xml-20060816/#sec-origin-goals>.