Jump to content

XML

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Sjc (talk | contribs) at 02:32, 7 July 2002. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

XML (for extensible markup language) is a standard maintained by the World Wide Web Consortium for creating special-purpose markup languages. It is general enough that XML-based languages can be used to describe a number of different kinds of data as well as text. Its primary purpose is to facilitate the sharing of structured text and information across the Internet. Although based on SGML, it is greatly simplified, despite including enhancements for portability. Languages based on XML (for example, RDF, SMIL and MathML, and SVG) are themselves described in a formal way, allowing programs to modify and validate documents in these languages without prior knowledge.

It should be noted that XML files themselves are simple ascii-text files.

Unlike, for example, HTML, XML is highly dependant upon structure, content and integrity for its efficacy. In order for a document to be considered "well-formed", i.e. fully XML-compliant, an XML file must conform (at the very least) to the following:

  • The document must identify itself as an XML document with a preliminary declaration to this effect.
  • A valid XML document may have only one root element.
  • Elements which contain entries must posess both an opening and a closing tag.
  • All attribute values must be enquoted.
  • Tags may be nested but may not overlap.

Before the advent of generalised data description languages such as XML, software designers had to define special file formats or small languages to share data between programs. This required writing detailed specifications and special purpose parsers and writers. For a language based on XML, however, the software designer can specify the basic syntax by writing a DTD, or a more detailed description using XML Schema. There are readily available (and in some cases free) tools which understand these descriptions -- XML parsers and writers. This may significantly reduce life-cycle development cost.

When an XML file is both compliant with the rules for well-formedness and is also in concordance with the DTD which it refers to, then the XML file is considered a "valid document".

As a further adjunct to XML is the stylesheet language XSL, which allows users to describe visual properties and transformations of XML data without embedding those instructions into the data itself. An XML file may also be rendered in a browser such as e.g. Internet Explorer 5 with the stylesheet language CSS.


See XSL, HTML, XHTML, UIML, S-expression.

Links: